prolint.config.logging

Logging configuration for ProLint.

This module provides functions for setting up and configuring logging.

Attributes

Functions

setup_logging(→ logging.Logger)

Configure logging for ProLint.

get_logger(→ logging.Logger)

Get a child logger for a ProLint module.

Module Contents

prolint.config.logging.DEFAULT_FORMAT = '%(asctime)s - %(name)s - %(levelname)s - %(message)s'[source]
prolint.config.logging.SIMPLE_FORMAT = '%(name)s - %(levelname)s - %(message)s'[source]
prolint.config.logging.setup_logging(level: int = logging.INFO, format_string: str | None = None, simple: bool = False) logging.Logger[source]

Configure logging for ProLint.

Parameters:
  • level (int, default=logging.INFO) – Logging level (e.g., logging.DEBUG, logging.INFO).

  • format_string (str, optional) – Custom format string for log messages.

  • simple (bool, default=False) – If True, use simplified format without timestamps.

Returns:

Configured ProLint logger instance.

Return type:

logging.Logger

prolint.config.logging.get_logger(name: str) logging.Logger[source]

Get a child logger for a ProLint module.

Parameters:

name (str) – Module name (will be prefixed with “prolint.”).

Returns:

Logger instance for the specified module.

Return type:

logging.Logger