logger ¤
Logging functions.
Classes:
-
PluginLogger
–A logger adapter to prefix messages with the originating package name.
Functions:
-
get_logger
–Return a logger for plugins.
PluginLogger ¤
Bases: LoggerAdapter
A logger adapter to prefix messages with the originating package name.
Parameters:
-
prefix
(str
) –The string to insert in front of every message.
-
logger
(Logger
) –The logger instance.
Methods:
-
process
–Process the message.
Source code in src/mkdocs_llmstxt/logger.py
15 16 17 18 19 20 21 22 23 |
|
process ¤
Process the message.
Parameters:
-
msg
(str
) –The message:
-
kwargs
(MutableMapping[str, Any]
) –Remaining arguments.
Returns:
Source code in src/mkdocs_llmstxt/logger.py
25 26 27 28 29 30 31 32 33 34 35 |
|
get_logger ¤
get_logger(name: str) -> PluginLogger
Return a logger for plugins.
Parameters:
-
name
(str
) –The name to use with
logging.getLogger
.
Returns:
-
PluginLogger
–A logger configured to work well in MkDocs, prefixing each message with the plugin package name.
Source code in src/mkdocs_llmstxt/logger.py
38 39 40 41 42 43 44 45 46 47 48 49 |
|