Commit 50e1a4ec authored by Philip ABBET's avatar Philip ABBET

[scripts] execute.py: Change the logging settings

parent 030d6ef3
......@@ -150,13 +150,21 @@ def main():
version=version)
# Sets up the logging system
# Setup the logging system
formatter = logging.Formatter(fmt="[%(asctime)s - execute.py - " \
"%(name)s] %(levelname)s: %(message)s",
datefmt="%d/%b/%Y %H:%M:%S")
handler = logging.StreamHandler()
handler.setFormatter(formatter)
root_logger = logging.getLogger('beat.backend.python')
root_logger.addHandler(handler)
if args['--debug']:
logging.basicConfig(format='[remote|%(name)s] %(levelname)s: %(message)s',
level=logging.DEBUG)
root_logger.setLevel(logging.DEBUG)
else:
logging.basicConfig(format='[remote|%(name)s] %(levelname)s: %(message)s',
level=logging.WARNING)
root_logger.setLevel(logging.INFO)
logger = logging.getLogger(__name__)
......
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