scikitplot.logging#
logging (alias, logger) module provide unified both Python logging and logging.Logger utilities.
View aliases#
Main aliases
scikitplot.logging
Compat aliases
scikitplot.logger
Inspired by “Tensorflow’s logging system” [1].
This module provides advanced logging utilities for Python applications, including support for singleton-based logging with customizable formatters, handlers, and thread-safety.
It extends Python’s standard logging library to enhance usability and flexibility for large-scale projects.
Scikit-plots logging helpers, supports vendoring.
Module Dependencies:
- Python standard library: logging
See also
References
User guide. See the Logging section for further details.
Logging Levels#
int([x]) -> integer int(x, base=10) -> integer |
|
int([x]) -> integer int(x, base=10) -> integer |
|
int([x]) -> integer int(x, base=10) -> integer |
|
int([x]) -> integer int(x, base=10) -> integer |
|
int([x]) -> integer int(x, base=10) -> integer |
|
int([x]) -> integer int(x, base=10) -> integer |
|
int([x]) -> integer int(x, base=10) -> integer |
|
int([x]) -> integer int(x, base=10) -> integer |
Logging Helpers#
A custom logging handler inherited from |
|
A custom logging formatter inherited from |
|
Return the effective level for the scikit-plots logger. |
|
Return SP (scikitplot) logger instance. |
|
Return the current verbosity level. |
|
Set the logger's level. |
|
Set the verbosity level. |
Standard Library Compatibility#
Re-exported from logging so this module can be used as a drop-in replacement.
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str |
|
Filter instances are used to perform arbitrary filtering of LogRecords. |
|
Formatter instances are used to convert a LogRecord to text. |
|
Handler instances dispatch logging events to specific destinations. |
|
A LogRecord instance represents an event being logged. |
|
Instances of the Logger class represent a single logging channel. |
|
This handler does nothing. |
|
A handler class which writes logging records, appropriately formatted, to a stream. |
|
Return the textual or numeric representation of logging level 'level'. |
|
Return a logger with the specified name, creating it if necessary. |
Log the Message#
Log the message at a predefined logging level.
Log a message at the specified log level. |
|
Log once per n calls from the same call site. |
|
Log only for the first n calls from the same call site. |
|
Log only if a condition is True. |
|
Log a message at the specified log level. |
|
Log a message at the DEBUG log level. |
|
Log a message at the INFO log level. |
|
Log a message at the WARNING log level. |
|
Log a message at the WARN -> WARNING log level. |
|
Log a message at the ERROR log level. |
|
Log an error-like message at a specified level. |
|
Log a message with severity 'ERROR' on the root logger. |
|
Compatibility wrapper for legacy call sites. |
|
Log a message at the CRITICAL log level. |
|
Log a message at the FATAL -> CRITICAL log level. |