From 3c11f170fef26e912aad9190baa47a6e508b1503 Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Tue, 22 Sep 2015 16:13:49 +0100 Subject: [PATCH] Include client nickname in magic folder log messages. Signed-off-by: Daira Hopwood --- src/allmydata/frontends/magic_folder.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/allmydata/frontends/magic_folder.py b/src/allmydata/frontends/magic_folder.py index 2569bf6d..5ea68bd8 100644 --- a/src/allmydata/frontends/magic_folder.py +++ b/src/allmydata/frontends/magic_folder.py @@ -16,7 +16,8 @@ from allmydata.util.fileutil import precondition_abspath, get_pathinfo from allmydata.util.assertutil import precondition from allmydata.util.deferredutil import HookMixin from allmydata.util.encodingutil import listdir_unicode, to_filepath, \ - unicode_from_filepath, quote_local_unicode_path, FilenameEncodingError + unicode_from_filepath, quote_local_unicode_path, quote_output, \ + FilenameEncodingError from allmydata.immutable.upload import FileName, Data from allmydata import backupdb, magicpath @@ -130,7 +131,7 @@ class QueueMixin(HookMixin): self._client.stats_provider.count('magic_folder.%s.%s' % (self._name, counter_name), delta) def _log(self, msg): - s = "Magic Folder %s: %s" % (self._name, msg) + s = "Magic Folder %s %s: %s" % (quote_output(self._client.nickname), self._name, msg) self._client.log(s) print s #open("events", "ab+").write(msg) -- 2.45.2