LogHandler

Description:

Logs messages and fact information based on a provided action (usually created by a rules engine). Action objects executed with this Handler should contain "logLevel" and "message" attributes.

Additional Details...

Tags:

rules, rules engine, action, action handler, logging

Properties:

In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.

Display NameAPI NameDefault ValueAllowable ValuesDescription
Log Prefixlog-prefixLog prefix appended to the log lines. It helps to distinguish the output of multiple LogAttribute processors.
Supports Expression Language: true (will be evaluated using variable registry only)
Log Factslog-factstrue
  • true
  • false
If true, the log message will include the facts which triggered this log action.
Default Log Levellogger-default-log-levelinfo
  • trace
  • debug
  • info
  • warn
  • error
If a log level is not provided as an attribute within an Action, the default log level will be used.
Default Log Messagelogger-default-log-messageRules Action Triggered Log.If a log message is not provided as an attribute within an Action, the default log message will be used.
Supports Expression Language: true (will be evaluated using variable registry only)
Enforce Action Typeaction-handler-enforce-typeThe Action Type(s) that should be supported by this handler. If provided any other type an exception will be thrown. This can support a comma delimited list of types (e.g. ALERT,LOG)
Supports Expression Language: true (will be evaluated using variable registry only)
Enforce Levelaction-handler-enforce-type-levelIGNORE
  • IGNORE
  • WARN
  • EXCEPTION
If specific action types are enforced, this setting specifies whether the action should be ignored, a warning should be logged or if an exception is thrown. Default is to ignore the received action.

State management:

This component does not store state.

Restricted:

This component is not restricted.

System Resource Considerations:

None specified.