Call the common loglevel code in util.set_logging_level()
Change-Id: If9380fc4646a93bb539ff410dd16d21633023957
diff --git a/vland.py b/vland.py
index 05699eb..2def201 100755
--- a/vland.py
+++ b/vland.py
@@ -90,22 +90,7 @@
print 'for each of your switches may help!'
print
-# Set up logging and maybe go quiet...
-if state.config.logging.level is None:
- state.config.logging.level = "CRITICAL"
-
-loglevel = logging.CRITICAL
-if state.config.logging.level == "ERROR":
- loglevel = logging.ERROR
-elif state.config.logging.level == "WARNING":
- loglevel = logging.WARNING
-elif state.config.logging.level == "INFO":
- loglevel = logging.INFO
-elif state.config.logging.level == "DEBUG":
- loglevel = logging.DEBUG
-
-os.environ['TZ'] = 'UTC'
-time.tzset()
+loglevel = util.set_logging_level(state.config.logging.level)
# Should we log to stderr?
if state.config.logging.filename is None: