Change in vdsm[master]: guestagent: Use %r for logging message
nsoffer at redhat.com
nsoffer at redhat.com
Fri Nov 27 22:17:59 UTC 2015
Nir Soffer has uploaded a new change for review.
Change subject: guestagent: Use %r for logging message
......................................................................
guestagent: Use %r for logging message
A message is a json object with a newline - logging it will create an
unwanted empty line in the log. Use %r to log the message contents with
escaped newline (\n).
Change-Id: I8e895800b3074bec942003c29b6f0766c01b0424
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
---
M vdsm/virt/guestagent.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/40/49340/1
diff --git a/vdsm/virt/guestagent.py b/vdsm/virt/guestagent.py
index 1b225a5..fb85b4a 100644
--- a/vdsm/virt/guestagent.py
+++ b/vdsm/virt/guestagent.py
@@ -241,7 +241,7 @@
args['__name__'] = cmd
message = json.dumps(args) + '\n'
self._sock.sendall(message)
- self.log.log(logging.TRACE, 'sent %s', message)
+ self.log.log(logging.TRACE, 'sent %r', message)
def _handleMessage(self, message, args):
self.log.log(logging.TRACE, "Guest's message %s: %s", message, args)
--
To view, visit https://gerrit.ovirt.org/49340
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8e895800b3074bec942003c29b6f0766c01b0424
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
More information about the vdsm-patches
mailing list