From 54f5e30992c7e0219ceff3f2bfdb34e2382fd83a Mon Sep 17 00:00:00 2001 From: John Jarvis Date: Tue, 4 Sep 2012 09:39:54 -0400 Subject: [PATCH] * Removed tracking log comment * Additional PEP8 format cleanup * Removed imports that are no longer necessary. --- lms/envs/logsettings.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/lms/envs/logsettings.py b/lms/envs/logsettings.py index 60cd1f8675..847992359d 100644 --- a/lms/envs/logsettings.py +++ b/lms/envs/logsettings.py @@ -1,5 +1,3 @@ -import os -import os.path import platform import sys from logging.handlers import SysLogHandler @@ -22,12 +20,6 @@ def get_logger_config(log_dir, if local_loglevel not in ['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL']: local_loglevel = 'INFO' - # If we're given an explicit place to put tracking logs, - # we do that (say for debugging). However, logging is not - # safe for multiple processes hitting the same file. - # So if it's left blank, we dynamically create the filename - # based on the PID of this worker process. - hostname = platform.node().split(".")[0] syslog_format = ("[%(name)s][env:{logging_env}] %(levelname)s [{hostname} " + " %(process)d] [%(filename)s:%(lineno)d] - %(message)s").format( @@ -43,8 +35,8 @@ def get_logger_config(log_dir, 'standard': { 'format': '%(asctime)s %(levelname)s %(process)d [%(name)s] %(filename)s:%(lineno)d - %(message)s', }, - 'syslog_format': {'format': syslog_format }, - 'raw': {'format': '%(message)s' }, + 'syslog_format': {'format': syslog_format}, + 'raw': {'format': '%(message)s'}, }, 'handlers': { 'console': {