Metrics Logger
The Metrics Logger plugin writes Step measurements and metrics to structured log files using Logback. The log format is compatible with Splunk and other log aggregation tools.
Enabling the plugin
The plugin is disabled by default and must be explicitly enabled in step.properties:
plugins.MetricsLoggerControllerPlugin.enabled=true
Log configuration
Log output is controlled by the CONTROLLER_DIR/bin/logback.xml file. The default configuration writes to a rolling file:
<appender name="MEASUREMENTS" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>../log/measurement-logger.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>../log/measurement-logger-%i.log</fileNamePattern>
<minIndex>1</minIndex>
<maxIndex>2</maxIndex>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<maxFileSize>1GB</maxFileSize>
</triggeringPolicy>
<encoder>
<pattern>{"timestamp":"%date","method":"%method","msg":%msg}%n</pattern>
</encoder>
</appender>
Log files are written to the path defined in the <file> tag — by default CONTROLLER_DIR/log/measurement-logger.log. The rolling policy, file size limit, and log format can all be adjusted to suit your environment.