Module structlog.logger
The logger package.
Class Logger
Logger:Logger (name, pipelines) | Create a new logger. |
Logger:add_pipeline (pipeline) | Add a new pipeline to the logger. |
Logger:clone () | Create a copy of the current logger. |
Logger:debug (msg, events) | Log a message and its events in debug severity. |
Logger:error (msg, events) | Log a message and its events in error severity. |
Logger:info (msg, events) | Log a message and its events in info severity. |
Logger:log (level, msg, events) | Log a message and its events with a custom log level. |
Logger:set_name (name) | Set the logger name and update it's context (logger_name). |
Logger:trace (msg, events) | Log a message and its events in trace severity. |
Logger:warn (msg, events) | Log a message and its events in warning severity. |
Class Logger
The logger class.
- Logger:Logger (name, pipelines)
-
Create a new logger.
Parameters:
- name The name of the logger.
- pipelines The list of pipeline to write the log entries to.
Returns:
-
A new logger instance.
- Logger:add_pipeline (pipeline)
-
Add a new pipeline to the logger.
Parameters:
- pipeline The pipeline to add.
- Logger:clone ()
-
Create a copy of the current logger.
The context of the cloned logger is deepcopied from the original one.
Returns:
-
A clone of the logger.
- Logger:debug (msg, events)
-
Log a message and its events in debug severity.
Parameters:
- msg
- events
See also:
- Logger:error (msg, events)
-
Log a message and its events in error severity.
Parameters:
- msg
- events
See also:
- Logger:info (msg, events)
-
Log a message and its events in info severity.
Parameters:
- msg
- events
See also:
- Logger:log (level, msg, events)
-
Log a message and its events with a custom log level.
Parameters:
- level The severity of the log.
- msg The logging message.
- events The list of key=value event pairs.
- Logger:set_name (name)
-
Set the logger name and update it's context (logger_name).
Parameters:
- name The name of the logger.
- Logger:trace (msg, events)
-
Log a message and its events in trace severity.
Parameters:
- msg
- events
See also:
- Logger:warn (msg, events)
-
Log a message and its events in warning severity.
Parameters:
- msg
- events
See also: