1
0
mirror of https://github.com/checktheroads/hyperglass synced 2024-05-11 05:55:08 +00:00

make LOG_LEVEL public

This commit is contained in:
checktheroads
2019-12-30 09:47:12 -07:00
parent 337986ffb4
commit 296ff0e202

View File

@ -67,9 +67,7 @@ try:
commands = _commands.Commands.import_params(user_commands)
elif not user_commands:
commands = _commands.Commands()
import json
log.info(json.dumps(user_devices, indent=2))
devices = _routers.Routers._import(user_devices.get("routers", dict()))
@ -83,9 +81,10 @@ except ValidationError as validation_errors:
# Logging Config
LOG_LEVEL = "INFO"
if params.general.debug:
_log_level = "DEBUG"
LOG_HANDLER["level"] = _log_level
LOG_LEVEL = "DEBUG"
LOG_HANDLER["level"] = LOG_LEVEL
log.remove()
log.configure(handlers=[LOG_HANDLER], levels=LOG_LEVELS)