From 64eafb98f988818de423e91f662817cf2b94942f Mon Sep 17 00:00:00 2001 From: Thomas B Thompson Date: Fri, 24 Dec 2010 03:18:43 -0500 Subject: done with logging stuff -- pretty simple, just need to import from logger module and then run something like "main_log.debug("text")" --- logger/Logger.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 logger/Logger.py (limited to 'logger/Logger.py') diff --git a/logger/Logger.py b/logger/Logger.py new file mode 100644 index 0000000..9c8598f --- /dev/null +++ b/logger/Logger.py @@ -0,0 +1,19 @@ +import logging +import logging.config + +logging.config.fileConfig("logger/loggingConfig.ini") + +# create logger +screen_log = logging.getLogger("root") +main_log = logging.getLogger("smoot_light") +exception_log = logging.getLogger("exception") + +#test code -- won't work unless file is imported by a file from the directory above this "logger" directory +#main_log.debug("debug mesage") +#main_log.info("info message") +#main_log.warn("warn message") +#main_log.error("error message") +#main_log.critical("critical message") +#exception_log.critical("hi") +#screen_log.error("whoa") + -- cgit v1.2.3