loggers
Logging functions.
LoggerAdapter ¤
LoggerAdapter(prefix, logger)
Bases: logging.LoggerAdapter
A logger adapter to prefix messages.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
prefix |
str
|
The string to insert in front of every message. |
required |
logger |
logging.Logger
|
The logger instance. |
required |
Source code in src/mkdocs_iframe/loggers.py
14 15 16 17 18 19 20 21 22 |
|
process ¤
process(msg, kwargs)
Process the message.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
msg |
str
|
The message: |
required |
kwargs |
MutableMapping[str, Any]
|
Remaining arguments. |
required |
Returns:
Type | Description |
---|---|
tuple[Any, MutableMapping[str, Any]]
|
The processed message, and the remaining arguments. |
Source code in src/mkdocs_iframe/loggers.py
24 25 26 27 28 29 30 31 32 33 34 |
|
get_logger ¤
get_logger(name)
Return a pre-configured logger.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
The name to use with |
required |
Returns:
Type | Description |
---|---|
LoggerAdapter
|
A logger configured to work well in MkDocs. |
Source code in src/mkdocs_iframe/loggers.py
37 38 39 40 41 42 43 44 45 46 47 48 |
|