Rev 419: When logging to stderr, we don't really need the timestamp and branch name. in http://bazaar.launchpad.net/~jameinel/loggerhead/configurable_logging
John Arbash Meinel
john at arbash-meinel.com
Wed Mar 16 11:39:34 UTC 2011
At http://bazaar.launchpad.net/~jameinel/loggerhead/configurable_logging
------------------------------------------------------------
revno: 419
revision-id: john at arbash-meinel.com-20110316113927-t2e1h8n1tsal9zpi
parent: john at arbash-meinel.com-20110316113503-c21ve1v3wru7kvae
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: configurable_logging
timestamp: Wed 2011-03-16 12:39:27 +0100
message:
When logging to stderr, we don't really need the timestamp and branch name.
It is nice in a long-term log file, but to stderr it tends to just cause
the output to wrap, which is ugly.
-------------- next part --------------
=== modified file 'loggerhead/main.py'
--- a/loggerhead/main.py 2011-03-16 11:35:03 +0000
+++ b/loggerhead/main.py 2011-03-16 11:39:27 +0000
@@ -74,9 +74,9 @@
else:
logfile_path = 'serve-branches.log'
handler = logging.FileHandler(logfile_path, 'a')
- formatter = logging.Formatter('%(asctime)s %(levelname)-8s %(name)s:'
- ' %(message)s')
- handler.setFormatter(formatter)
+ formatter = logging.Formatter('%(asctime)s %(levelname)-8s %(name)s:'
+ ' %(message)s')
+ handler.setFormatter(formatter)
# We set the handler to accept all messages, the *logger* won't emit them
# if it is configured to suppress it
handler.setLevel(logging.DEBUG)
More information about the bazaar-commits
mailing list