Don't call logging.basicConfig
In the agency you call the basicConfig of the logging module:
This does not include the names of the modules.
Can we either update the name using '%(asctime)s - %(name) - [%(levelname)s] - %(message)s'
or don't call the basicConfig in here and set it in the agentlib instead?
try:
log_type = os.environ['CLONEMAP_LOG_LEVEL']
if log_type == "info":
logging.basicConfig(format='%(asctime)s - [%(levelname)s] - %(message)s',
level=logging.INFO)
else:
logging.basicConfig(format='%(asctime)s - [%(levelname)s] - %(message)s',
level=logging.ERROR)
except KeyError:
logging.basicConfig(format='%(asctime)s - [%(levelname)s] - %(message)s',
level=logging.ERROR)