Application Logs
Application logs are generated to record the events that are affecting the platform. The application logs are used for monitoring and troubleshooting the platform. In general, the application logs are generated by the core components of the platform and are typically sent to the standard output (stdout) or standard error (stderr) streams of containers and can be collected by the logging infrastructure.
Application logs are useful as additional information that can help to understand the context of the events that are happening in the platform. The application logs can be used to identify the root cause of the issues and to troubleshoot the problems.
Log format
Core writes its application logs to the standard output of its container in one of two forms:
- Text, the default: one human-readable line per log entry, as in the example of a text log.
- JSON: one JSON object per line, so that a log collector can store and search each field without parsing text. The JSON follows either the Elastic Common Schema (ECS) or the Logstash layout.
Choosing the format
The format is chosen when Core is deployed, with the PLATFORM_LOG_FORMAT environment variable:
| Value | Format |
|---|---|
text | Plain text lines. This is the default, used when the variable is not set. |
ecs | JSON in the Elastic Common Schema layout, suited to Elasticsearch, OpenSearch and Kibana. |
logstash | JSON in the Logstash layout, which most log collectors and log pipelines can read. |
Any other value stops Core at startup. The Graylog Extended Log Format (GELF) is not supported, because it cannot carry the audit and event records that the JSON formats include.
With the Helm chart, set the logging.format value, see Configurable parameters. With the operator, set spec.common.logging.format in the Platform resource, see Platform options. Both refuse an unsupported value before Core is changed.
A log collector that expects text lines cannot read JSON lines, and the other way round. When you change the format, change how your log collector parses Core's output in the same rollout.
The format applies only to the application logs Core writes to its container. Logs that Core sends through OpenTelemetry are the same whichever format is chosen.
Contents of a JSON log line
Every JSON line carries the time, the log level, the name of the logger, the thread and the message. In addition:
- While Core handles a request, each line carries who made the request and what it was, in fields whose names start with
log_actor_(for examplelog_actor_nameandlog_actor_type) andlog_source_(for examplelog_source_pathandlog_source_ipAddress). - During protocol requests, such as ACME, CMP or SCEP, and some other operations, lines also name the operation and the object it acts on, in fields whose names start with
log_audit_(for examplelog_audit_operationandlog_audit_resource). - An error carries its stack trace in a single field, instead of on separate lines.
- In the ECS layout,
service.nameiscore, and when Core runs on Kubernetesservice.node.nameis the name of the pod that wrote the line, so that lines from different replicas can be told apart.
Audit and event logs in JSON format
Event logs, and audit logs whose output includes the console, are part of the application logs. In the text format, each of them is a text line whose message is the log record as JSON. In the JSON formats, the record is included once, as an object in the log_record field of the line, with the structure described in Log Record Structure. The message field of the line then holds a short summary: the record's own message, or its operation, resource and result, for example revoke certificates success.
Most audit records are written separately from the request that caused them, so an audit line does not necessarily carry the log_actor_ and log_source_ fields of the request. Who performed the operation, and from where, is in the actor and source of its log_record.
Storing JSON logs in Elasticsearch or OpenSearch
The operationData and additionalData fields of a log_record hold data whose shape differs from one operation to another; for audit logs, additionalData holds the parameters of the request when verbose audit logging is enabled in the logging settings. With dynamic mapping, a field that holds text in one record and an object in another causes the record to be rejected, and the number of distinct fields can exceed the limit of the index.
Map both fields as flattened in Elasticsearch, or as flat_object in OpenSearch. They stay searchable, without a mapping for each field inside them. For example, in the template of the index your log collector writes to:
{
"mappings": {
"properties": {
"log_record": {
"properties": {
"operationData": { "type": "flattened" },
"additionalData": { "type": "flattened" }
}
}
}
}
}
Example of a text log
The following is an example of the application log in the text format:
[2024-11-25 08:00:22.467] ERROR [rabbit-simple-14] [com.otilm.core.service.impl.CrlServiceImpl - 66]: Failed to read CRL content from URL: http://pki.example.com/crls/demo/democlientsubca.crl, http://pki.example.com/crls/demo/democlientsubca.crl
[2024-11-25 08:22:54.666] INFO [tomcat-handler-29568] [com.otilm.core.config.ProtocolValidationFilter - 49]: ACME Request from 185.24.21.241 for /api/v1/protocols/acme/acmetest/directory
[2024-11-25 08:22:54.700] DEBUG [tomcat-handler-29568] [com.otilm.core.service.acme.impl.AcmeServiceImpl - 158]: Gathering Directory information for ACME: acmetest
Example of a JSON log
The following is an audit log line in the ECS layout. It is shown formatted for readability; Core writes each entry on a single line.
{
"@timestamp": "2026-10-05T12:43:02.871Z",
"log": {
"level": "INFO",
"logger": "com.otilm.core.service.impl.AuditLogServiceImpl"
},
"process": {
"pid": 1,
"thread": { "name": "auditLogsListener-1" }
},
"service": {
"name": "core",
"version": "2.20.0",
"node": { "name": "core-7d9f6c8b5-x2kqp" }
},
"message": "revoke certificates success",
"log_record": {
"version": "1.1",
"audited": true,
"module": "certificates",
"actor": {
"type": "user",
"authMethod": "session",
"uuid": "6a1c5f3e-0d3b-4c9e-9a51-3f0f6e2d1b77",
"name": "jane.admin"
},
"source": {
"method": "POST",
"path": "/api/v2/operations/authorities/1f2e8c4a-5b6d-4e7f-8a9b-0c1d2e3f4a5b/raProfiles/9c4d7e1f-2a3b-4c5d-6e7f-8a9b0c1d2e3f/certificates/0b9d1e2a-7c4f-4a8e-b2d6-5e3f1a9c8d07/revoke",
"contentType": "application/json",
"ipAddress": "10.20.30.40",
"userAgent": "Mozilla/5.0"
},
"resource": {
"type": "certificates",
"objects": [
{ "name": "4d1e9a3c7b2f5e8a", "uuid": "0b9d1e2a-7c4f-4a8e-b2d6-5e3f1a9c8d07" }
]
},
"affiliatedResource": {
"type": "raProfiles",
"objects": [
{ "name": "web-servers", "uuid": "9c4d7e1f-2a3b-4c5d-6e7f-8a9b0c1d2e3f" }
]
},
"operation": "revoke",
"operationResult": "success",
"message": null,
"operationData": null,
"additionalData": null,
"timestamp": "2026-10-05T14:43:02.826+02:00"
},
"ecs": { "version": "8.11" }
}
In the Logstash layout the fields sit at the top level of the line. The CRL error from the example of a text log looks like this:
{
"@timestamp": "2024-11-25T08:00:22.467+01:00",
"@version": "1",
"message": "Failed to read CRL content from URL: http://pki.example.com/crls/demo/democlientsubca.crl, http://pki.example.com/crls/demo/democlientsubca.crl",
"logger_name": "com.otilm.core.service.impl.CrlServiceImpl",
"thread_name": "rabbit-simple-14",
"level": "ERROR",
"level_value": 40000
}