ubii.framework.logging module¶
- ubii.framework.logging.logging_setup = <ubii.framework.logging._logging_setup object>¶
- ubii.framework.logging.parse_args(parser: argparse.ArgumentParser | None = None) argparse.Namespace¶
Convenience function to parse command line arguments. Adds the following command line arguments to the parser:
--verbose,-v– can be specified multiple times, increases the verbosity of the framework logging--debug– sets the framework todebug()mode--log-config– takes a yaml file containing a dictionary forlogging.config.dictConfig()configuration, an example config is available at https://github.com/saggitar/ubii-node-python/blob/develop/src/ubii/framework/util/logging_config.yaml
Example
from ubii.framework.logging import parse_args import argparse parser = argparse.ArgumentParser() parser.add_argument('--processing-modules', action='append', default=[]) parser.add_argument('--no-discover', action='store_true', default=False) args = parse_args(parser=parser)
- Parameters:
parser – if no parser is passed, a new one is created – optional
- Returns:
parsed arguments