Change in vdsm[master]: logging: Unify SimpleLogAdapter format
gerrit-hooks has posted comments on this change. Change subject: logging: Unify SimpleLogAdapter format .. Patch Set 3: * Update Tracker::IGNORE, no bug url/s found * Set MODIFIED::IGNORE, no Bug-Url found. -- To view, visit https://gerrit.ovirt.org/64227 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib4edb64d214e515c9cfc45175f6cfee4340d28de Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Adam Litke Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Milan Zamazal Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: logging: Unify SimpleLogAdapter format
Dan Kenigsberg has submitted this change and it was merged. Change subject: logging: Unify SimpleLogAdapter format .. logging: Unify SimpleLogAdapter format SimpleLogAdapter was prefixing the log message with context info, using "::" as message separator. This made sense when the log was using "::" as field separator, but now we are using spaces. Additionally the old format use strange quoting and no spacing between pairs, making the format harder to read: task=`xxxyyy`res=`foo.bar.baz`::Message text ... The new format fixes these issues and enclose the context info in parenthesis to match the new log format: (task='xxxyyy', res='foo.bar.baz') Message text ... This matches the format we used lately in many logs for adding message details. Here is an example line using the format: 2016-09-23 02:21:57,965 INFO (Thread-11) [virt.vm] (vmId='45b59cae-f2a0-4d83-8da8-b7c0a21fbe14') VM wrapper has started (vm:1751) Change-Id: Ib4edb64d214e515c9cfc45175f6cfee4340d28de Signed-off-by: Nir Soffer Reviewed-on: https://gerrit.ovirt.org/64227 Continuous-Integration: Jenkins CI Reviewed-by: Milan Zamazal Reviewed-by: Edward Haas Reviewed-by: Piotr Kliczewski Reviewed-by: Dan Kenigsberg --- M lib/vdsm/logUtils.py 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Piotr Kliczewski: Looks good to me, but someone else must approve Nir Soffer: Verified Jenkins CI: Passed CI tests Dan Kenigsberg: Looks good to me, approved Edward Haas: Looks good to me, but someone else must approve Milan Zamazal: Looks good to me, but someone else must approve -- To view, visit https://gerrit.ovirt.org/64227 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib4edb64d214e515c9cfc45175f6cfee4340d28de Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Adam Litke Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Milan Zamazal Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: logging: Unify SimpleLogAdapter format
Dan Kenigsberg has posted comments on this change. Change subject: logging: Unify SimpleLogAdapter format .. Patch Set 2: Code-Review+2 raising -- To view, visit https://gerrit.ovirt.org/64227 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib4edb64d214e515c9cfc45175f6cfee4340d28de Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Adam Litke Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Milan Zamazal Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: logging: Unify SimpleLogAdapter format
Piotr Kliczewski has posted comments on this change. Change subject: logging: Unify SimpleLogAdapter format .. Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/64227 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib4edb64d214e515c9cfc45175f6cfee4340d28de Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Adam Litke Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Milan Zamazal Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: logging: Unify SimpleLogAdapter format
Edward Haas has posted comments on this change. Change subject: logging: Unify SimpleLogAdapter format .. Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/64227 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib4edb64d214e515c9cfc45175f6cfee4340d28de Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Adam Litke Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Milan Zamazal Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: logging: Unify SimpleLogAdapter format
Milan Zamazal has posted comments on this change. Change subject: logging: Unify SimpleLogAdapter format .. Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/64227 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib4edb64d214e515c9cfc45175f6cfee4340d28de Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Adam Litke Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Milan Zamazal Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: logging: Unify SimpleLogAdapter format
Nir Soffer has posted comments on this change. Change subject: logging: Unify SimpleLogAdapter format .. Patch Set 2: Verified+1 -- To view, visit https://gerrit.ovirt.org/64227 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib4edb64d214e515c9cfc45175f6cfee4340d28de Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Adam Litke Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Milan Zamazal Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: logging: Unify SimpleLogAdapter format
gerrit-hooks has posted comments on this change. Change subject: logging: Unify SimpleLogAdapter format .. Patch Set 2: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/64227 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib4edb64d214e515c9cfc45175f6cfee4340d28de Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Adam Litke Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Milan Zamazal Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: logging: Unify SimpleLogAdapter format
Milan Zamazal has posted comments on this change. Change subject: logging: Unify SimpleLogAdapter format .. Patch Set 1: (1 comment) Except for the commit comment I support this change. https://gerrit.ovirt.org/#/c/64227/1//COMMIT_MSG Commit Message: Line 23: This matches the format we used lately in many logs for adding message Line 24: details. Line 25: Line 26: Here is an example log: Line 27: https://paste.fedoraproject.org/431636/raw/ Let's not use temporary references in commit messages. Line 28: Line 29: Change-Id: Ib4edb64d214e515c9cfc45175f6cfee4340d28de -- To view, visit https://gerrit.ovirt.org/64227 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib4edb64d214e515c9cfc45175f6cfee4340d28de Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Adam Litke Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Milan Zamazal Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: logging: Unify SimpleLogAdapter format
gerrit-hooks has posted comments on this change. Change subject: logging: Unify SimpleLogAdapter format .. Patch Set 1: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/64227 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib4edb64d214e515c9cfc45175f6cfee4340d28de Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: logging: Unify SimpleLogAdapter format
Nir Soffer has posted comments on this change. Change subject: logging: Unify SimpleLogAdapter format .. Patch Set 1: Verified+1 -- To view, visit https://gerrit.ovirt.org/64227 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib4edb64d214e515c9cfc45175f6cfee4340d28de Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: logging: Unify SimpleLogAdapter format
Nir Soffer has uploaded a new change for review. Change subject: logging: Unify SimpleLogAdapter format .. logging: Unify SimpleLogAdapter format SimpleLogAdapter was prefixing the log message with context info, using "::" as message separator. This made sense when the log was using "::" as field separator, but now we are using spaces. Additionally the old format use strange quoting and no spacing between pairs, making the format harder to read: task=`xxxyyy`res=`foo.bar.baz`::Message text ... The new format fixes these issues and enclose the context info in parenthesis to match the new log format: (task='xxxyyy', res='foo.bar.baz') Message text ... This matches the format we used lately in many logs for adding message details. Here is an example log: https://paste.fedoraproject.org/431636/raw/ Change-Id: Ib4edb64d214e515c9cfc45175f6cfee4340d28de Signed-off-by: Nir Soffer --- M lib/vdsm/logUtils.py 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/27/64227/1 diff --git a/lib/vdsm/logUtils.py b/lib/vdsm/logUtils.py index 4c5ad8c..e726d9b 100644 --- a/lib/vdsm/logUtils.py +++ b/lib/vdsm/logUtils.py @@ -104,11 +104,11 @@ Would produce this message:: -"task=`xxxyyy`res=`foo.bar.baz`::Message" +"(task='xxxyyy', res='foo.bar.baz') Message" """ self.logger = logger -items = "".join("%s=`%s`" % (k, v) for k, v in context.iteritems()) -self.prefix = items + "::" +items = ", ".join("%s='%s'" % (k, v) for k, v in context.iteritems()) +self.prefix = "(%s) " % items def process(self, msg, kwargs): return self.prefix + msg, kwargs -- To view, visit https://gerrit.ovirt.org/64227 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib4edb64d214e515c9cfc45175f6cfee4340d28de Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org