Merge ~cjwatson/launchpad:py3-services-log-print into launchpad:master

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: 452f752ae6261a953031420d69a8fc15a451a484
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/launchpad:py3-services-log-print
Merge into: launchpad:master
Diff against target: 22 lines (+3/-1)
1 file modified
lib/lp/services/log/logger.py (+3/-1)
Reviewer Review Type Date Requested Status
Thiago F. Pappacena (community) Approve
Review via email: mp+381338@code.launchpad.net

Commit message

Port lp.services.log.logger to print_function

To post a comment you must log in.
Revision history for this message
Thiago F. Pappacena (pappacena) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lib/lp/services/log/logger.py b/lib/lp/services/log/logger.py
2index 04a1456..cd83d35 100644
3--- a/lib/lp/services/log/logger.py
4+++ b/lib/lp/services/log/logger.py
5@@ -3,6 +3,8 @@
6
7 """Loggers."""
8
9+from __future__ import absolute_import, print_function
10+
11 __metaclass__ = type
12 __all__ = [
13 'BufferLogger',
14@@ -127,7 +129,7 @@ class FakeLogger:
15 else:
16 output_file = self.output_file
17 prefix = LEVEL_PREFIXES.get(level, "%d>" % level)
18- print >> output_file, prefix, self._format_message(msg, *stuff)
19+ print(prefix, self._format_message(msg, *stuff), file=output_file)
20
21 if 'exc_info' in kw:
22 traceback.print_exc(file=output_file)

Subscribers

People subscribed via source and target branches

to status/vote changes: