Journey logging

In Journey version 12.1.2 and earlier, the property JOURNEY_LOGGING, in the journey_master_config.properties file, was only used for tracing the audience.

From version 12.1.3 onwards, the JOURNEY_LOGGING feature has the following enhancements:
  • Indication of whether the Journey started or not at the default Journey engine log level.
  • Easy to customize the logging to display any the following logs: FATAL, ERROR, WARN, INFO, DEBUG, TRACEAUDIENCE, or TRACE.
  • Logs Read-from Kafka and Write-to Kafka at Trace level.
  • Creating multiple log files per Journey.

Configuring the JOURNEY_LOGGING property

The rules for configuring the JOURNEY_LOGGING property are as follows:

  1. Access the journey_master_config.properties file and locate the JOURNEY_LOGGING property.
  2. Uncomment the property for editing it an providing values.
  3. The values must be CSV strings and the format of each string must be J_ID:LEVEL, where:
    • J_ID is the Journey ID
    • LEVEL can one of the following values: FATAL, ERROR, WARN, INFO, DEBUG, TRACEAUDIENCE, or TRACE. The order of LEVEL values from highly specific to less specific are as follows: FATAL, ERROR, WARN, INFO, DEBUG, TRACEAUDIENCE, or TRACE
  4. The default value of J_ID:LEVEL is an empty string. To modify the value of J_ID:LEVEL, uncomment it and provide the required value.
  5. To adjust the default value of the logger com.hcl.journeyLogger, access log4j2.xml and make the changes. Ensure that the log levels configured must be specific to the one in log4j2.xml.
  6. After configuring J_ID:LEVEL, the system creates a J_ID.log file. This log file is specific to the Journey ID. If you want to check the logs of multiple Journeys, configure multiple J_ID:LEVEL separated by a comma. The system creates a J_ID.log files, each for a Journey ID.
  7. If you apply DEFAULT:<LEVEL> for all Journeys excluding the ones specified in JOURNEY_LOGGING:
    1. If you do not provide value for DEFAULT, it is considered as OFF.
    2. If J_ID:LEVEL is not configured in Journey Logging, the log levels of log4j2.xml is considered.
  8. To capture the logs of Ignite cache(Delay/ES/DS/Wait4Capacity), provide the values in the following format:
    JOURNEY_LOGGING=181#361:DEBUG,<J_ID>#<NODE_ID>:DEBUG

    where:

    <J_ID> is the Journey ID and <NODE_ID> is the Node ID.

Note:
  • Changes are automatically reloaded within 60 seconds.
  • If you configure log level per package/class level in log4j2, ensure that JOURNEY_LOGGING is empty or commented. The combination of journey log level and class specific log config is not supported.
JOURNEY_LOGGING=Archival:WARN - This parameter is used to set the desired logging level for Journey Engine.
  • spring.jpa.properties.hibernate.jdbc.batch_size=900 - This parameter specifies the max number of records in a batch for insert and update using JDBC connection. changing this value may impact the Engine performance.
  • spring.jpa.properties.hibernate.order_inserts=true - This parameter specifies if insert statements should be batched or not.
  • spring.jpa.properties.hibernate.order_updates=true - This parameter specifies if insert statements should be batched or not.
  • journey.kafka.producer.linger.ms=500 - Time in milliseconds Kafka producer waits for gathering 16kb (default) data before making network dispatch
  • audience.archival.cron - This is used to mention the archival cron job for the Journey Audience table.

Log4j

In case of log4j2.xml class or package configurations, access the log4j2.xml file and use the following example by uncommenting it:
<Logger name="<<class name>> or <<package name>>" level="<<log level>>" additivity="false">
<appender-ref ref="Routing"/>
<appender-ref ref="console"/>
</Logger>

where:

  • <<class name>> is the fully qualified class name
  • <<package name>> is the fully qualified package name
  • <<log level>> is one of the log levels as mentioned in Configuring the JOURNEY_LOGGING property.