X4 Help Center
7.5 7.4 German English
Auto Light Dark
Auto Light Dark
7.5 7.4 German English

Log4J Logging

This adapter outputs data from the process via Log4J to the server log. All data that can be converted into a string can serve as input data. In AdvancedMode, data can be output directly at various log levels in an XML document with an adapter-specific structure.

This adapter transmits its input data unchanged to the next process step.

Properties

Operation

Determines which operation the adapter executes

Possible values: Execute: Execute adapter

Parameters

logger

Used logger to which the log message is to be sent

Possible values:

  • Any logger name

  • X4Logger: Output as XX4Logger in the server console via Log4j

level

Level of the output log message. In the Log4j configuration a threshold (parameter Threshold) is defined, from which level log messages are output; mostly this is INFO.

Possible values:

  • DEBUG: Output debug information (if allowed by the logging configuration)

  • INFO: Output general information or processed process data

  • WARN: Output a warning for an unexpected situation

  • ERROR: Output error message (caught exception)

  • FATAL: Output critical system error

    Log messages with the level FATAL are output with the level ERROR for technical reasons. The output receives FATAL: as prefix.

advancedMode

Activate extended mode in which an input XML document with an adapter-specific structure is processed separately. Such an XML document can contain log messages that are output at a specified log level (see example below)

Possible values:

  • yes: parse input XML documents

  • no: Do not parse input XML documents (default)

modifyMessage

Modify/expand log message

Possible values:

  • Nothing: Output log message with unchanged layout

  • AddPid: Additionally output the current process instance ID in the log message (default).

Status values

1

The operation was executed successfully.

-1

The operation failed due to a technical error.

Example

If the advancedMode parameter is enabled: This adapter-specific input XML document contains information about the log level and the log messages to be output. The messages are output directly to the server log:

<logs>
   <log logger="X4Logger">
      <message level="DEBUG">This is a debug message.</message>
      <message level="INFO">This is a info message. </message>
      <message level="WARN">This is a warn message. </message>
      <message level="ERROR">This is an error message. </message>
      <message level="FATAL">This is a fatal message. </message>
   </log>
</logs>