MCPcopy Create free account
hub / github.com/apache/storm / initialize_set_log_level_subcommand

Function initialize_set_log_level_subcommand

bin/storm.py:681–715  ·  view source on GitHub ↗
(subparsers)

Source from the content-addressed store, hash-verified

679
680
681def initialize_set_log_level_subcommand(subparsers):
682 sub_parser = subparsers.add_parser(
683 "set_log_level", help="""
684 Dynamically change topology log levels
685 e.g.
686 ./bin/storm set_log_level -l ROOT=DEBUG:30 topology-name
687
688 Set the root logger's level to DEBUG for 30 seconds
689
690 ./bin/storm set_log_level -l com.myapp=WARN topology-name
691
692 Set the com.myapp logger's level to WARN for 30 seconds
693
694 ./bin/storm set_log_level -l com.myapp=WARN -l com.myOtherLogger=ERROR:123 topology-name
695
696 Set the com.myapp logger's level to WARN indefinitely, and com.myOtherLogger
697 to ERROR for 123 seconds
698
699 ./bin/storm set_log_level -r com.myOtherLogger topology-name
700
701 Clears settings, resetting back to the original level
702 """, formatter_class=SortingHelpFormatter
703 )
704
705 sub_parser.add_argument("-l", action="append", default=[], help="""
706 -l [logger name]=[log level][:optional timeout] where log level is one of:
707 ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF
708 """)
709 sub_parser.add_argument("-r", action="append", default=[], help="""
710 -r [logger name]
711 """)
712 sub_parser.add_argument("topology-name")
713
714 sub_parser.set_defaults(func=set_log_level)
715 add_common_options(sub_parser)
716
717
718def initialize_deactivate_subcommand(subparsers):

Callers 1

initialize_main_commandFunction · 0.85

Calls 1

add_common_optionsFunction · 0.85

Tested by

no test coverage detected