MCPcopy Create free account
hub / github.com/StackStorm/st2 / setup_logging

Function setup_logging

st2client/st2client/shell.py:524–538  ·  view source on GitHub ↗
(argv)

Source from the content-addressed store, hash-verified

522
523
524def setup_logging(argv):
525 debug = "--debug" in argv
526
527 root = LOGGER
528 root.setLevel(logging.WARNING)
529
530 handler = logging.StreamHandler(sys.stderr)
531 handler.setLevel(logging.WARNING)
532 formatter = logging.Formatter("%(asctime)s %(levelname)s - %(message)s")
533 handler.setFormatter(formatter)
534
535 if not debug:
536 handler.addFilter(LogLevelFilter(log_levels=[logging.ERROR]))
537
538 root.addHandler(handler)
539
540
541def main(argv=sys.argv[1:]):

Callers 3

mainFunction · 0.85
enable_debuggingFunction · 0.85
disable_debuggingFunction · 0.85

Calls 1

LogLevelFilterClass · 0.90

Tested by

no test coverage detected