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(): ...@@ -150,13 +150,21 @@ def main():
version=version) 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']: if args['--debug']:
logging.basicConfig(format='[remote|%(name)s] %(levelname)s: %(message)s', root_logger.setLevel(logging.DEBUG)
level=logging.DEBUG)
else: else:
logging.basicConfig(format='[remote|%(name)s] %(levelname)s: %(message)s', root_logger.setLevel(logging.INFO)
level=logging.WARNING)
logger = logging.getLogger(__name__) 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