Commit 7ba2b28c by Qubad786

Fix logging issues.

parent cd0b4495
......@@ -28,6 +28,8 @@ def get_logger_config(log_dir='/var/tmp',
if local_loglevel not in ['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL']:
local_loglevel = 'INFO'
console_loglevel = 'DEBUG' if debug else 'INFO'
hostname = platform.node().split(".")[0]
syslog_format = (
"[service_variant={service_variant}]"
......@@ -39,10 +41,7 @@ def get_logger_config(log_dir='/var/tmp',
logging_env=logging_env, hostname=hostname
)
if debug:
handlers = ['console']
else:
handlers = ['local']
handlers = ['console', 'local']
logger_config = {
'version': 1,
......@@ -62,7 +61,7 @@ def get_logger_config(log_dir='/var/tmp',
},
'handlers': {
'console': {
'level': 'DEBUG' if debug else 'INFO',
'level': console_loglevel,
'class': 'logging.StreamHandler',
'formatter': 'standard',
'stream': sys.stdout,
......
......@@ -9,8 +9,6 @@ import datetime
import yaml
from VEDA.utils import get_config
LOGGER = logging.getLogger(__name__)
requests.packages.urllib3.disable_warnings()
......@@ -36,6 +34,8 @@ Send data to VAL, either Video ID data or endpoint URLs
from control_env import *
from control.veda_utils import ErrorObject, Output
LOGGER = logging.getLogger(__name__)
class VALAPICall():
......
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