.. SPDX-FileCopyrightText: © 2015 Read the Docs, Inc .. SPDX-FileCopyrightText: © 2024 The "Whiteprints" contributors .. .. SPDX-License-Identifier: MIT whiteprints.cli.logs ==================== .. py:module:: whiteprints.cli.logs .. autoapi-nested-parse:: Logging configuration for the CLI. Attributes ---------- .. autoapisummary:: whiteprints.cli.logs.LogLevel Functions --------- .. autoapisummary:: whiteprints.cli.logs.configure_logging Module Contents --------------- .. SPDX-FileCopyrightText: © 2015 Read the Docs, Inc .. SPDX-FileCopyrightText: © 2024 The "Whiteprints" contributors .. .. SPDX-License-Identifier: MIT .. py:data:: LogLevel :type: TypeAlias :value: Literal['CRITICAL', 'ERROR', 'WARNING', 'INFO', 'DEBUG', 'NOTSET'] .. SPDX-FileCopyrightText: © 2015 Read the Docs, Inc .. SPDX-FileCopyrightText: © 2024 The "Whiteprints" contributors .. .. SPDX-License-Identifier: MIT .. py:function:: configure_logging(level: LogLevel, *, file: TextIO, log_format: str = _('[{process}:{thread}] [{pathname}:{funcName}:{lineno}]\n{message}'), date_format: str = _('[%Y-%m-%dT%H:%M:%S]')) -> None Configure Rich logging handler. :param level: The logging verbosity level. :param file: An optional file in which to log. :param log_format: The log message format. :param date_format: The log date format. .. rubric:: Example >>> import sys >>> >>> configure_logging("INFO", file=sys.stderr) None .. seealso:: https://rich.readthedocs.io/en/stable/logging.html