]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Include client nickname in magic folder log messages.
authorDaira Hopwood <daira@jacaranda.org>
Tue, 22 Sep 2015 15:13:49 +0000 (16:13 +0100)
committerDaira Hopwood <daira@jacaranda.org>
Tue, 22 Sep 2015 15:13:49 +0000 (16:13 +0100)
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
src/allmydata/frontends/magic_folder.py

index 2569bf6d4ef9ac9af268b4f4cbfe5425c8ec4a01..5ea68bd85036d34269bf41670295a7f70a61b80e 100644 (file)
@@ -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)