aboutsummaryrefslogtreecommitdiff
path: root/logger/Logger.py
diff options
context:
space:
mode:
authorGravatar Thomas B Thompson <tbent@spice.(none)>2010-12-24 03:18:43 -0500
committerGravatar Thomas B Thompson <tbent@spice.(none)>2010-12-24 03:23:26 -0500
commit64eafb98f988818de423e91f662817cf2b94942f (patch)
tree5ce876dc64131cf0fc405a0d0bd1f1027b57d9fe /logger/Logger.py
parent8cecf83f16fcdec5b3ee68cc40c2b360e0f845d0 (diff)
done with logging stuff -- pretty simple, just need to import from logger module and then run something like "main_log.debug("text")"
Diffstat (limited to 'logger/Logger.py')
-rw-r--r--logger/Logger.py19
1 files changed, 19 insertions, 0 deletions
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")
+