View logs
Akka provides logs that you can view in the Console or access with the CLI. For each service instance we aggregate a maximum of 1MB of log data. You can capture all log output by attaching a logging provider, such as Google Cloud’s operations suite (formerly Stackdriver), as described here.
Exporting logs
Logs can be exported for searching, reporting, alerting and long term storage by configuring the Akka observability configuration for your project. See here for detailed documentation.
Correlating logs
You can correlate your log statements, those that you write in your application, by adding the MDC pattern %mdc{trace_id}
to your log file when tracing is enabled. Like the following:
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} %-5level %logger{36} trace_id: %mdc{trace_id} - %msg%n</pattern>
</encoder>
</appender>
...
</configuration>
This way, the trace ID that’s passed through your components will be added to your logs. For more information on tracing, click here.