mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-03 04:07:52 +00:00
lf_logger_config_test.py : removed spacing from simple logger format, added filename
lf_logger_config_test.py : updated to show example of using lf_logger_config.json one directy up lf_logger_config.json , lf_logger_config_example.json : updated with simple format Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
committed by
shivam
parent
d697963cec
commit
57f8a83020
@@ -79,7 +79,10 @@ class lf_logger_config:
|
||||
# for now just configure the output formatting. Basic defaults
|
||||
# Change to level=logging.WARNING , also may limit some of the output
|
||||
logging.basicConfig(handlers=[logging.StreamHandler(stream=sys.stdout)], level=logging.INFO,
|
||||
format='%(created)-16f %(name)-8s %(levelname)-12s %(lineno)-6s %(funcName)-30s [%(module)s]: %(message)s')
|
||||
format='%(created)f %(name)s %(levelname)-8s %(filename)s %(lineno)s %(funcName)s [%(module)s]: %(message)s')
|
||||
# Note: leave this for reference
|
||||
# logging.basicConfig(handlers=[logging.StreamHandler(stream=sys.stdout)], level=logging.INFO,
|
||||
# format='%(created)-16f %(name)-8s %(levelname)-12s %(lineno)-6s %(funcName)-30s [%(module)s]: %(message)s')
|
||||
# Note the propagate is tricky in the sence if not set correctly will create duplicate logs output,
|
||||
# setting to false
|
||||
logging.propagate = False
|
||||
|
||||
Reference in New Issue
Block a user