Martin Peřina has posted comments on this change. Change subject: tools: Adds helpers to configure java logging in tools ......................................................................
Patch Set 3: (1 comment) http://gerrit.ovirt.org/#/c/32852/3/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/log/JavaLoggingFormatter.java File backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/log/JavaLoggingFormatter.java: Line 28: date = new Date(); Line 29: } Line 30: Line 31: @Override Line 32: public synchronized String format(LogRecord record) { > why synchronized? better to construct the format. It uses Date instance in method and changes its value, that's why the method must be synchronized. I think it's cheaper to reuse Date instance than create a new one per log record. It's the same concept as in original SimpleFormatter implementation in JDK. Line 33: date.setTime(record.getMillis()); Line 34: Line 35: StringBuilder source = new StringBuilder(); Line 36: if (record.getSourceClassName() != null) { -- To view, visit http://gerrit.ovirt.org/32852 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie1c46ca552888b347a4ff810003e0fcc818f832f Gerrit-PatchSet: 3 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Peřina <mper...@redhat.com> Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: Martin Peřina <mper...@redhat.com> Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches