ctl.plugins.log_alert
Plugin that allows you send notification for log events
Classes
LogAlertPlugin
LogAlertPlugin(ctl.plugins.log.LogPlugin)
send notifications on log events
Instanced Attributes
These attributes / properties will be available on instances of the class
- messages (
list
): list of messages that triggered a notification
Methods
alert
def alert(self, **kwargs)
Send alert through another plugin
Keyword arguments
- levels (
list
): list of logging levels that will cause triggering of this alert. As soon as there is at least one message with the appropriate level the alert will be sent - plugin (
str
): name of plugin instance to use to facilitate the alert. Plugin needs to have analert
method - output_levels (
list
): allows you to specify which levels to collect into the output message. If not specified will default to thelevels
list.
finalize
def finalize(self, message, level)
Finalize before message is logged
Arguments
- message (
str
) - level (
str
): logging severity level
init
def init(self)
called after the plugin is initialized, plugin may define this for any other initialization code