diff --git a/python_apps/pypo/logging.cfg b/python_apps/pypo/logging.cfg index f0a4b4bee..4c1ddd172 100644 --- a/python_apps/pypo/logging.cfg +++ b/python_apps/pypo/logging.cfg @@ -1,8 +1,8 @@ [loggers] -keys=root,fetch,push,recorder,message_h,notify +keys=root,fetch,push,recorder,message_h [handlers] -keys=pypo,recorder,message_h,notify +keys=pypo,recorder,message_h [formatters] keys=simpleFormatter @@ -35,18 +35,6 @@ handlers=message_h qualname=message_h propagate=0 -[logger_notify] -level=DEBUG -handlers=notify -qualname=notify -propagate=0 - -[handler_notify] -class=logging.handlers.RotatingFileHandler -level=DEBUG -formatter=simpleFormatter -args=("/var/log/airtime/pypo/notify.log", 'a', 1000000, 5,) - [handler_pypo] class=logging.handlers.RotatingFileHandler level=DEBUG diff --git a/python_apps/pypo/notify_logging.cfg b/python_apps/pypo/notify_logging.cfg new file mode 100644 index 000000000..6bf4a9160 --- /dev/null +++ b/python_apps/pypo/notify_logging.cfg @@ -0,0 +1,28 @@ +[loggers] +keys=root,notify + +[handlers] +keys=notify + +[formatters] +keys=simpleFormatter + +[logger_root] +level=DEBUG +handlers=pypo + +[logger_notify] +level=DEBUG +handlers=notify +qualname=notify +propagate=0 + +[handler_notify] +class=logging.handlers.RotatingFileHandler +level=DEBUG +formatter=simpleFormatter +args=("/var/log/airtime/pypo/notify.log", 'a', 1000000, 5,) + +[formatter_simpleFormatter] +format=%(asctime)s %(levelname)s - [%(filename)s : %(funcName)s() : line %(lineno)d] - %(message)s +datefmt= diff --git a/python_apps/pypo/pyponotify.py b/python_apps/pypo/pyponotify.py index 63bb9aa63..6d85b76f9 100644 --- a/python_apps/pypo/pyponotify.py +++ b/python_apps/pypo/pyponotify.py @@ -46,7 +46,7 @@ parser.add_option("-y", "--source-status", help="source connection stauts", meta (options, args) = parser.parse_args() # configure logging -logging.config.fileConfig("logging.cfg") +logging.config.fileConfig("notify_logging.cfg") logger = logging.getLogger('notify') LogWriter.override_std_err(logger)