Log Filter plugins provide a way to process logging output from commands, scripts and other workflow step types. They can filter the output (remove, add, modify), or they can be used to capture or convert the output. They can also add metadata to the logs, or emit new log data.
Log Filter plugins implement the LogFilterPlugin interface, and provider the
Users creating Workflows can configure Log Filter plugins within their workflow in two ways:
When the top level, or step level is ready, all configured Log Filter plugins will be initialized using the optional
For each log event emitted within the configured level, each configured Log Filter plugin will have its
handleEvent method called, in order, with a LogEventControl instance. The LogEventControl can be used to get or modify the content of the LogEvent (message, type, level, metadata). It can also control how the log event is handled:
emit: the log should be emitted
quell: the log should be futher processed, but not emitted in the final log
quiet: the final loglevel should be set to VERBOSE
remove: the log event should not be processed further
Create a groovy script that calls the
rundeckPlugin method and passes the
LogFilterPlugin as the type of plugin:
To define metadata about your plugin, and configuration properties, see the Plugin Development - Groovy Plugin Development chapter.
LogFilterPlugin Groovy DLS supports these closure definitions:
initinitialization for the plugin (optional)
handleEventhandle a log event (required)
completecomplete the log filter processing after all events have been handled (optional)
For the basics of plugin localization see: Plugin Development - Plugin Localization.
Several built-in plugins are listed here: