magpie.cli.utils

Functions

set_logger_config(→ logging.Logger)

Applies the provided logging configuration settings to the logger.

make_logging_options(→ None)

Defines argument parser options for logging operations.

setup_logger_from_options(→ None)

Uses argument parser options to setup logging level from specified flags.

Module Contents

magpie.cli.utils.set_logger_config(logger: logging.Logger, force_stdout: bool = False, message_format: magpie.typedefs.Str | None = None, datetime_format: magpie.typedefs.Str | None = None, log_file: magpie.typedefs.Str | None = None) logging.Logger[source]

Applies the provided logging configuration settings to the logger.

magpie.cli.utils.make_logging_options(parser: argparse.ArgumentParser) None[source]

Defines argument parser options for logging operations.

magpie.cli.utils.setup_logger_from_options(logger: logging.Logger, args: argparse.Namespace) None[source]

Uses argument parser options to setup logging level from specified flags.

Setup both the specific CLI logger that is provided and the generic magpie logger.