diff options
author | Jefferson Stachelski <jstachel@thoughtworks.com> | 2015-03-10 17:05:00 -0300 |
---|---|---|
committer | Jefferson Stachelski <jstachel@thoughtworks.com> | 2015-03-10 17:05:07 -0300 |
commit | 740a44d3c5916055fe16ddddeda6aed322fa961e (patch) | |
tree | 85cab5a042222bb4d0bd16dcbdbd5b62f63be261 /service | |
parent | 58f6a2f088a57823a4469e0c8c62ebff3f7c5597 (diff) |
#87 Removed logging to /tmp/pixelated.log file
Diffstat (limited to 'service')
-rw-r--r-- | service/pixelated/config/logging_setup.py | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/service/pixelated/config/logging_setup.py b/service/pixelated/config/logging_setup.py index 443d7d82..a15413a0 100644 --- a/service/pixelated/config/logging_setup.py +++ b/service/pixelated/config/logging_setup.py @@ -22,22 +22,18 @@ from twisted.python import log from twisted.python import util -LOG_FILE = '/tmp/pixelated.log' - - def init_logging(args): debug_enabled = args.debug or os.environ.get('DEBUG', False) logging.basicConfig(level=logging.DEBUG if debug_enabled else logging.WARNING, format='[%(asctime)s] ' + socket.gethostname() + ' %(name)-12s %(levelname)-8s %(message)s', datefmt='%m-%d %H:%M:%S', - filename=LOG_FILE, filemode='a') if debug_enabled: init_debugger() - init_twisted_logging() + log.startLogging(sys.stdout) def init_debugger(): @@ -48,12 +44,6 @@ def init_debugger(): logging.getLogger('').addHandler(console) -def init_twisted_logging(): - log.startLogging(sys.stdout) - file_observer = PixelatedLogObserver(file(LOG_FILE, 'a')) - log.addObserver(file_observer.emit) - - class PixelatedLogObserver(log.FileLogObserver): """ FileLogObserver with a customized format """ |