launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #24531
[Merge] ~cjwatson/launchpad:py3-services-log-print into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:py3-services-log-print into launchpad:master.
Commit message:
Port lp.services.log.logger to print_function
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/381338
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:py3-services-log-print into launchpad:master.
diff --git a/lib/lp/services/log/logger.py b/lib/lp/services/log/logger.py
index 04a1456..cd83d35 100644
--- a/lib/lp/services/log/logger.py
+++ b/lib/lp/services/log/logger.py
@@ -3,6 +3,8 @@
"""Loggers."""
+from __future__ import absolute_import, print_function
+
__metaclass__ = type
__all__ = [
'BufferLogger',
@@ -127,7 +129,7 @@ class FakeLogger:
else:
output_file = self.output_file
prefix = LEVEL_PREFIXES.get(level, "%d>" % level)
- print >> output_file, prefix, self._format_message(msg, *stuff)
+ print(prefix, self._format_message(msg, *stuff), file=output_file)
if 'exc_info' in kw:
traceback.print_exc(file=output_file)