Skip to content

jam.logger

logger

Classes:

Name Description
BaseLogger

Interface for logging.

JamLogger

Default jam logger, use stdlib logging.

BaseLogger

Bases: ABC

Interface for logging.

Methods:

Name Description
debug

Log a debug message.

error

Log an error message.

info

Log an informational message.

warning

Log a warning message.

debug abstractmethod

debug(message: str, *args: Any) -> None

Log a debug message.

error abstractmethod

error(message: str, exc_info: bool = False) -> None

Log an error message.

Parameters:

Name Type Description Default
message str

Error message

required
exc_info bool

Whether to include exception info

False

info abstractmethod

info(message: str) -> None

Log an informational message.

warning abstractmethod

warning(message: str, exc_info: bool = False) -> None

Log a warning message.

Parameters:

Name Type Description Default
message str

Warning message

required
exc_info bool

Whether to include exception info

False

JamLogger

JamLogger(
    log_level: Literal[
        "DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"
    ]
    | str = "INFO",
)

Bases: BaseLogger

Default jam logger, use stdlib logging.

Methods:

Name Description
__repr__

Return a string representation of the logger.

__str__

Return a string representation of the logger.

debug

Log a debug message.

error

Log an error message.

info

Log an informational message.

warning

Log a warning message.

__repr__

__repr__() -> str

Return a string representation of the logger.

__str__

__str__() -> str

Return a string representation of the logger.

debug

debug(message: str, *args: Any) -> None

Log a debug message.

error

error(message: str, exc_info: bool = False) -> None

Log an error message.

Parameters:

Name Type Description Default
message str

Error message

required
exc_info bool

Whether to include exception info

False

info

info(message: str) -> None

Log an informational message.

warning

warning(message: str, exc_info: bool = False) -> None

Log a warning message.

Parameters:

Name Type Description Default
message str

Warning message

required
exc_info bool

Whether to include exception info

False