Logging
MAPS Messaging logs to ${MAPS_DATA}/log/
using Logback. Two primary files are created:
messaging.log
— main operational log (Audit entries are excluded here).audit.log
— audit‑only log (contains only entries marked with theAudit
marker).
Both files rotate daily (*.log-YYYY-MM-DD.log.gz
) and keep 7 days by default.
Default logback.xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<shutdownHook/>
<!-- Main application log (DENY Audit) -->
<appender name="LogFile" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${MAPS_DATA}/log/messaging.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>messaging.log-%d{yyyy-MM-dd}.log.gz</fileNamePattern>
<maxHistory>7</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss}, [%X{division}-%X{category}], [%t] %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<appender name="AsyncLogFile" class="ch.qos.logback.classic.AsyncAppender">
<filter class="ch.qos.logback.core.filter.EvaluatorFilter">
<evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
<Marker>Audit</Marker>
</evaluator>
<OnMatch>DENY</OnMatch>
<OnMismatch>NEUTRAL</OnMismatch>
</filter>
<appender-ref ref="LogFile"/>
</appender>
<!-- Audit-only log (ACCEPT only Audit) -->
<appender name="AuditFile" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${MAPS_DATA}/log/audit.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>audit.log-%d{yyyy-MM-dd}.log.gz</fileNamePattern>
<maxHistory>7</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss}, [%X{division}-%X{category}], [%t] %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<appender name="AsyncAuditFile" class="ch.qos.logback.classic.AsyncAppender">
<filter class="ch.qos.logback.core.filter.EvaluatorFilter">
<evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
<Marker>Audit</Marker>
</evaluator>
<OnMatch>ACCEPT</OnMatch>
<OnMismatch>DENY</OnMismatch>
</filter>
<appender-ref ref="AuditFile"/>
</appender>
<root level="info">
<appender-ref ref="AsyncLogFile"/>
<appender-ref ref="AsyncAuditFile"/>
</root>
</configuration>
Customizing Logging
- Change log level: update
<root level="info">
todebug
,warn
, orerror
as needed. - Retention: adjust
<maxHistory>
(days kept) per appender. - Paths: change
<file>${MAPS_DATA}/log/...
to write elsewhere (ensure permissions). - Markers: application code can mark audit events with the
Audit
marker; the config above routes them intoaudit.log
.
After changing
logback.xml
, restart the server to apply changes.
Where to look during issues
- Startup problems:
messaging.log
for stack traces and port binding errors. - Security / access events:
audit.log
. - Health: REST endpoints
/api/v1/ping
and/health
can confirm liveness apart from logs.