Encap server logs
Server log
This file contains all log messages from the running server. With the exception of audit messages.
The current log file applies to the running Encap server instance, or last running Encap server instance if the server is stopped.
Files with a date in the file format are archived log files and may be safely moved elsewhere.
Log configuration
<ENCAP_HOME>/core/config/ contains the logback.xml file for configuration of logging:
Current log, file format
The file is called stderrout.log.
Archived log file format
The archived log file format is given as stderrout-yyyy-MM-dd.log, where:
- yyyy: Year
- MM: Month of year
- dd: Day of month
The default number of days to keep the logs is 200.
Audit Log
Contains all audit log messages. There exists two audit log files:
- The
audit.logthat contains all logs written by the Encap server. - The
audit_cmd.logthat contains all logging from running command scripts:addUser.shmanageConfig.shmanageApiKey.sh.
Audit logging is done for all incoming calls into the Encap server and for all outgoing calls from the Encap server (with some exceptions).
- Name format:
audit.<date>.log(latest log isaudit.log)audit_cmd.<date>.log(latest log isaudit_cmd.log)
- Default days to keep logs: 3650 (10 years)
Audit logging to file is enabled by default. The logger below is set in logback.xml:
<logger name="com.encapsecurity.encap.service.logging.AuditLogger" level="INFO">
<appender-ref ref="audit"/>
</logger>
Audit log file entry examples
2025-10-09 15:42:42,231 d65b349b-4ce6-4191-a709-c15d299f53ee AUDIT {"eventType":"REST_START_ACTIVATION","eventStatus":"BEGIN","eventId":"7c04e019-9cdd-4bf1-9979-5e76f5ef4149","userId":null,"sessionId":null,"sessionUuid":null,"sessionStatus":null,"altId":null,"responseTime":0,"clientAddress":"127.0.0.1","metaInfo":"","requestId":"d65b349b-4ce6-4191-a709-c15d299f53ee","registrationId":null,"applicationId":"encap","time":"2025-10-09T13:42:42.231UTC","organizationId":"04cab507-9713-4c2d-943f-95997b243f9e","traceId":"00000000000000000000000000000000","authMethod":null,"clientVersion":null,"operatingSystemType":null,"faceMapId":null,"errorMessage":null,"auditLogVersion":8,"ltime":1760017362231}
2025-10-09 15:42:42,234 d65b349b-4ce6-4191-a709-c15d299f53ee AUDIT {"eventType":"REST_START_ACTIVATION","eventStatus":"SUCCESS","eventId":"7c04e019-9cdd-4bf1-9979-5e76f5ef4149","userId":null,"sessionId":1537,"sessionUuid":"1f9b5954-8b23-41fb-86fa-f306c48d3a95","sessionStatus":"IN_PROGRESS","altId":null,"responseTime":3,"clientAddress":"127.0.0.1","metaInfo":"","requestId":"d65b349b-4ce6-4191-a709-c15d299f53ee","registrationId":"0bda22da-4393-4e44-b332-281c14ceea13","applicationId":"encap","time":"2025-10-09T13:42:42.234UTC","organizationId":"04cab507-9713-4c2d-943f-95997b243f9e","traceId":"00000000000000000000000000000000","authMethod":null,"clientVersion":null,"operatingSystemType":null,"faceMapId":null,"errorMessage":null,"auditLogVersion":8,"ltime":1760017362234}
2025-10-09 15:42:42,247 7c5209e3-7be6-4bac-a622-b0e6a29b5afe AUDIT {"eventType":"DEVICE_START_ACTIVATION","eventStatus":"BEGIN","eventId":"918c96f7-3f02-4735-b43d-b3e1a99fdd43","userId":null,"sessionId":null,"sessionUuid":null,"sessionStatus":null,"altId":null,"responseTime":0,"clientAddress":"127.0.0.1","metaInfo":"","requestId":"7c5209e3-7be6-4bac-a622-b0e6a29b5afe","registrationId":null,"applicationId":"encap","time":"2025-10-09T13:42:42.247UTC","organizationId":"04cab507-9713-4c2d-943f-95997b243f9e","traceId":"00000000000000000000000000000000","authMethod":null,"clientVersion":"3.21.0","operatingSystemType":"Android","faceMapId":null,"errorMessage":null,"auditLogVersion":8,"ltime":1760017362247}
2025-10-09 15:42:42,250 7c5209e3-7be6-4bac-a622-b0e6a29b5afe AUDIT {"eventType":"DEVICE_START_ACTIVATION","eventStatus":"SUCCESS","eventId":"918c96f7-3f02-4735-b43d-b3e1a99fdd43","userId":null,"sessionId":1537,"sessionUuid":"1f9b5954-8b23-41fb-86fa-f306c48d3a95","sessionStatus":"IN_PROGRESS","altId":null,"responseTime":3,"clientAddress":"127.0.0.1","metaInfo":"","requestId":"7c5209e3-7be6-4bac-a622-b0e6a29b5afe","registrationId":"0bda22da-4393-4e44-b332-281c14ceea13","applicationId":"encap","time":"2025-10-09T13:42:42.250UTC","organizationId":"04cab507-9713-4c2d-943f-95997b243f9e","traceId":"00000000000000000000000000000000","authMethod":null,"clientVersion":"3.21.0","operatingSystemType":"Android","faceMapId":null,"errorMessage":null,"auditLogVersion":8,"ltime":1760017362250}
2025-10-09 15:42:42,261 39e237b3-cbb4-4890-9a7e-a7100f26e1f7 AUDIT {"eventType":"DEVICE_FINISH_ACTIVATION","eventStatus":"BEGIN","eventId":"68bcf052-2215-4872-a240-3b67f1041640","userId":null,"sessionId":1537,"sessionUuid":"1f9b5954-8b23-41fb-86fa-f306c48d3a95","sessionStatus":"IN_PROGRESS","altId":null,"responseTime":0,"clientAddress":"127.0.0.1","metaInfo":"activateAuthMethods=[DEVICE_PIN, DEVICE]","requestId":"39e237b3-cbb4-4890-9a7e-a7100f26e1f7","registrationId":"0bda22da-4393-4e44-b332-281c14ceea13","applicationId":"encap","time":"2025-10-09T13:42:42.261UTC","organizationId":"04cab507-9713-4c2d-943f-95997b243f9e","traceId":"00000000000000000000000000000000","authMethod":null,"clientVersion":"3.21.0","operatingSystemType":"Android","faceMapId":null,"errorMessage":null,"auditLogVersion":8,"ltime":1760017362261}
2025-10-09 15:42:42,263 39e237b3-cbb4-4890-9a7e-a7100f26e1f7 AUDIT {"eventType":"DEVICE_FINISH_ACTIVATION","eventStatus":"SUCCESS","eventId":"68bcf052-2215-4872-a240-3b67f1041640","userId":null,"sessionId":1537,"sessionUuid":"1f9b5954-8b23-41fb-86fa-f306c48d3a95","sessionStatus":"IN_PROGRESS","altId":null,"responseTime":1,"clientAddress":"127.0.0.1","metaInfo":"activateAuthMethods=[DEVICE_PIN, DEVICE]","requestId":"39e237b3-cbb4-4890-9a7e-a7100f26e1f7","registrationId":"0bda22da-4393-4e44-b332-281c14ceea13","applicationId":"encap","time":"2025-10-09T13:42:42.263UTC","organizationId":"04cab507-9713-4c2d-943f-95997b243f9e","traceId":"00000000000000000000000000000000","authMethod":null,"clientVersion":"3.21.0","operatingSystemType":"Android","faceMapId":null,"errorMessage":null,"auditLogVersion":8,"ltime":1760017362263}
2025-10-09 15:42:42,275 bd56ec36-fa67-4ea3-bb3c-0dc377c377f5 AUDIT {"eventType":"REST_GET_SESSION","eventStatus":"BEGIN","eventId":"34849291-5e1e-4e0b-987f-2ae4bde6b08f","userId":null,"sessionId":1537,"sessionUuid":"1f9b5954-8b23-41fb-86fa-f306c48d3a95","sessionStatus":"SUCCESS","altId":null,"responseTime":0,"clientAddress":"127.0.0.1","metaInfo":"","requestId":"bd56ec36-fa67-4ea3-bb3c-0dc377c377f5","registrationId":"0bda22da-4393-4e44-b332-281c14ceea13","applicationId":"encap","time":"2025-10-09T13:42:42.275UTC","organizationId":"04cab507-9713-4c2d-943f-95997b243f9e","traceId":"00000000000000000000000000000000","authMethod":null,"clientVersion":null,"operatingSystemType":null,"faceMapId":null,"errorMessage":null,"auditLogVersion":8,"ltime":1760017362275}
2025-10-09 15:42:42,277 bd56ec36-fa67-4ea3-bb3c-0dc377c377f5 AUDIT {"eventType":"REST_GET_SESSION","eventStatus":"SUCCESS","eventId":"34849291-5e1e-4e0b-987f-2ae4bde6b08f","userId":null,"sessionId":1537,"sessionUuid":"1f9b5954-8b23-41fb-86fa-f306c48d3a95","sessionStatus":"SUCCESS","altId":null,"responseTime":1,"clientAddress":"127.0.0.1","metaInfo":"","requestId":"bd56ec36-fa67-4ea3-bb3c-0dc377c377f5","registrationId":"0bda22da-4393-4e44-b332-281c14ceea13","applicationId":"encap","time":"2025-10-09T13:42:42.277UTC","organizationId":"04cab507-9713-4c2d-943f-95997b243f9e","traceId":"00000000000000000000000000000000","authMethod":null,"clientVersion":null,"operatingSystemType":null,"faceMapId":null,"errorMessage":null,"auditLogVersion":8,"ltime":1760017362277}
2025-10-09 15:42:42,286 088a6d84-9aac-4301-9594-f34e1461b200 AUDIT {"eventType":"REST_START_AUTHENTICATION","eventStatus":"BEGIN","eventId":"52817397-2cd1-45c3-971e-034ae89d0996","userId":null,"sessionId":null,"sessionUuid":null,"sessionStatus":null,"altId":null,"responseTime":0,"clientAddress":"127.0.0.1","metaInfo":"","requestId":"088a6d84-9aac-4301-9594-f34e1461b200","registrationId":"0bda22da-4393-4e44-b332-281c14ceea13","applicationId":"encap","time":"2025-10-09T13:42:42.286UTC","organizationId":"04cab507-9713-4c2d-943f-95997b243f9e","traceId":"00000000000000000000000000000000","authMethod":null,"clientVersion":null,"operatingSystemType":null,"faceMapId":null,"errorMessage":null,"auditLogVersion":8,"ltime":1760017362286}
2025-10-09 15:42:42,288 088a6d84-9aac-4301-9594-f34e1461b200 AUDIT {"eventType":"REST_START_AUTHENTICATION","eventStatus":"SUCCESS","eventId":"52817397-2cd1-45c3-971e-034ae89d0996","userId":null,"sessionId":1538,"sessionUuid":"86300d55-39df-420a-92fe-7c729a2f13c9","sessionStatus":"IN_PROGRESS","altId":null,"responseTime":2,"clientAddress":"127.0.0.1","metaInfo":"","requestId":"088a6d84-9aac-4301-9594-f34e1461b200","registrationId":"0bda22da-4393-4e44-b332-281c14ceea13","applicationId":"encap","time":"2025-10-09T13:42:42.288UTC","organizationId":"04cab507-9713-4c2d-943f-95997b243f9e","traceId":"00000000000000000000000000000000","authMethod":null,"clientVersion":null,"operatingSystemType":null,"faceMapId":null,"errorMessage":null,"auditLogVersion":8,"ltime":1760017362288}
2025-10-09 15:42:42,301 513d91f9-982d-4470-8a6d-0d954868a7ca AUDIT {"eventType":"DEVICE_START_AUTHENTICATION","eventStatus":"BEGIN","eventId":"f783a2df-f56b-4a00-8b84-715fb142d553","userId":null,"sessionId":1538,"sessionUuid":"86300d55-39df-420a-92fe-7c729a2f13c9","sessionStatus":"IN_PROGRESS","altId":null,"responseTime":0,"clientAddress":"127.0.0.1","metaInfo":"","requestId":"513d91f9-982d-4470-8a6d-0d954868a7ca","registrationId":"0bda22da-4393-4e44-b332-281c14ceea13","applicationId":"encap","time":"2025-10-09T13:42:42.301UTC","organizationId":"04cab507-9713-4c2d-943f-95997b243f9e","traceId":"00000000000000000000000000000000","authMethod":"DEVICE_PIN","clientVersion":"3.21.0","operatingSystemType":"Android","faceMapId":null,"errorMessage":null,"auditLogVersion":8,"ltime":1760017362301}
2025-10-09 15:42:42,303 513d91f9-982d-4470-8a6d-0d954868a7ca AUDIT {"eventType":"DEVICE_START_AUTHENTICATION","eventStatus":"SUCCESS","eventId":"f783a2df-f56b-4a00-8b84-715fb142d553","userId":null,"sessionId":1538,"sessionUuid":"86300d55-39df-420a-92fe-7c729a2f13c9","sessionStatus":"IN_PROGRESS","altId":null,"responseTime":1,"clientAddress":"127.0.0.1","metaInfo":"","requestId":"513d91f9-982d-4470-8a6d-0d954868a7ca","registrationId":"0bda22da-4393-4e44-b332-281c14ceea13","applicationId":"encap","time":"2025-10-09T13:42:42.303UTC","organizationId":"04cab507-9713-4c2d-943f-95997b243f9e","traceId":"00000000000000000000000000000000","authMethod":"DEVICE_PIN","clientVersion":"3.21.0","operatingSystemType":"Android","faceMapId":null,"errorMessage":null,"auditLogVersion":8,"ltime":1760017362303}
2025-10-09 15:42:42,329 8a863db2-9855-4f04-9d84-d87f830031c5 AUDIT {"eventType":"DEVICE_FINISH_AUTHENTICATION","eventStatus":"BEGIN","eventId":"c4027b36-2c8d-48de-8a3c-ca40542c47b6","userId":null,"sessionId":1538,"sessionUuid":"86300d55-39df-420a-92fe-7c729a2f13c9","sessionStatus":"IN_PROGRESS","altId":null,"responseTime":0,"clientAddress":"127.0.0.1","metaInfo":"","requestId":"8a863db2-9855-4f04-9d84-d87f830031c5","registrationId":"0bda22da-4393-4e44-b332-281c14ceea13","applicationId":"encap","time":"2025-10-09T13:42:42.329UTC","organizationId":"04cab507-9713-4c2d-943f-95997b243f9e","traceId":"00000000000000000000000000000000","authMethod":"DEVICE_PIN","clientVersion":"3.21.0","operatingSystemType":"Android","faceMapId":null,"errorMessage":null,"auditLogVersion":8,"ltime":1760017362329}
2025-10-09 15:42:42,333 8a863db2-9855-4f04-9d84-d87f830031c5 AUDIT {"eventType":"DEVICE_FINISH_AUTHENTICATION","eventStatus":"SUCCESS","eventId":"c4027b36-2c8d-48de-8a3c-ca40542c47b6","userId":null,"sessionId":1538,"sessionUuid":"86300d55-39df-420a-92fe-7c729a2f13c9","sessionStatus":"IN_PROGRESS","altId":null,"responseTime":4,"clientAddress":"127.0.0.1","metaInfo":"","requestId":"8a863db2-9855-4f04-9d84-d87f830031c5","registrationId":"0bda22da-4393-4e44-b332-281c14ceea13","applicationId":"encap","time":"2025-10-09T13:42:42.333UTC","organizationId":"04cab507-9713-4c2d-943f-95997b243f9e","traceId":"00000000000000000000000000000000","authMethod":"DEVICE_PIN","clientVersion":"3.21.0","operatingSystemType":"Android","faceMapId":null,"errorMessage":null,"auditLogVersion":8,"ltime":1760017362333}
Audit log v8 fields
Purpose
Event type
- Originators are those triggering the event.
- Service providers trigger events through either the WS API or the REST API.
- Operations trigger events through either the Encap administration UI or management shell scripts.
- Recipients are those handling the event.
Request Log
Request logs are a record of the requests that the Encap server has processed. There is one entry per request received. This is in the common log format (NCSA), making it convenient to analyse them.
A standard request log entry includes the:
- Client IP address
- Date
- Method
- URL
- Result
- Size
- Referrer
- User agent
- Latency
The Encap server provides a request log in a common log format. The format can be configured in the Encap instance configuration.
The request log appender writes to the request.log file found in the logs folder. The appender has a size based rolling policy of 10 MB, and it keeps the last 10 files as zip files with file pattern request.<number>.log.zip. The appender configuration can be updated in the logback.xml file.
<!-- Request log appender -->
<appender name="request" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>./logs/request.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>request.%i.log.zip</fileNamePattern>
<minIndex>1</minIndex>
<maxIndex>10</maxIndex>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<maxFileSize>10MB</maxFileSize>
</triggeringPolicy>
<encoder>
<Pattern>%d %X{requestCorrelationId} %m%n</Pattern>
</encoder>
</appender>
The request logger is by default disabled with level OFF in the logback.xml file. To enable request logging, change the level to INFO.
<!-- Jetty request logging is default OFF. Change level to INFO to enable it -->
<logger name="org.eclipse.jetty.server.RequestLog" level="OFF">
<appender-ref ref="request"/>
</logger>
Monitoring
The Encap server is monitoring:
- Class loading
- JVM memory
- JVM GC
- JVM threads
- CPU metrics
- Jetty thread pool
- Jetty connection statistics
The Encap server also monitors statistics for:
- Event callback
- Performance per operation
- DB cleanup
Prometheus
The Encap server has optional support to output metrics to Prometheus.
For configuration, look for parameters beginning with Prometheus in the list of available configuration parameters on the Server configuration.
You can read more about Prometheus in their developer documentation.