Commit aa4ad89b authored by Pierre-Elliott Bécue's avatar Pierre-Elliott Bécue

[clogger] On récupère moins if/else-ment le level.

parent 43e7947e
......@@ -22,14 +22,8 @@ class CLogger(logging.Logger):
# Creates FileHandler
self.fh = logging.FileHandler("/var/log/clogger/%s.log" % (loggerName,))
if level == "debug":
self.fhlevel = logging.DEBUG
elif level == "info":
self.fhlevel = logging.INFO
elif level == "warning":
self.fhlevel = logging.WARNING
self.fhlevel = logging.CRITICAL
# Catches appropriate level in logging.
self.fhlevel = getattr(logging, level.upper(), logging.INFO)
# Creates formatter
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment