Skip to content

Logging

The engine writes its own diagnostic logs through Log4j2. These are the engine's logs about itself, separate from the event data it processes.

Where the logs go

The engine resolves the log directory at startup:

  1. TENX_LOG_PATH, if set.
  2. Otherwise /var/log/tenx/ on Linux and macOS, %AppData%\tenx\log\ on Windows.

The file is tenx.log in that directory. TENX_LOG_PATH is appended to directly, so it needs a trailing separator (/ on Linux and macOS, \ on Windows).

export TENX_LOG_PATH=/custom/log/path/

To log to stdout instead of a file, name the console appender:

export TENX_LOG_APPENDER=tenxConsoleAppender

Rotation

Setting Default
Size trigger 10 MB
Archives kept 10
Archive name tenx.{date}.{index}.log

Changing the configuration

Rotation, layout, and appenders come from log4j2.yaml in $TENX_CONFIG. The defaults:

properties:
  property:
    - name: log-path
      value: "${env:TENX_LOG_PATH:-/var/log/tenx/}"

appenders:
  rollingFile:
    - name: tenxFileAppender
      fileName:    "${log-path}tenx.log"
      filePattern: "${log-path}tenx.%d{dd-MMM}.%i.log"
      policies:
        sizeBasedTriggeringPolicy:
          size: 10MB
      defaultRollOverStrategy:
        max: 10