From 296ff0e20204dee9fadb3f793e6ef6d2ca55ce70 Mon Sep 17 00:00:00 2001 From: checktheroads Date: Mon, 30 Dec 2019 09:47:12 -0700 Subject: [PATCH] make LOG_LEVEL public --- hyperglass/configuration/__init__.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/hyperglass/configuration/__init__.py b/hyperglass/configuration/__init__.py index 4a91d79..94685b6 100644 --- a/hyperglass/configuration/__init__.py +++ b/hyperglass/configuration/__init__.py @@ -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)