#3080 - Including a timestamp in LogEvent and in the MDC
This commit is contained in:
parent
75c9d1d5ad
commit
7f84dbf448
7 changed files with 95 additions and 19 deletions
|
|
@ -284,3 +284,16 @@ information is available in the MDC with attribute name ``akkaSource``::
|
|||
|
||||
For more details on what this attribute contains—also for non-actors—please see
|
||||
`How to Log`_.
|
||||
|
||||
More accurate timestamps for log output in MDC
|
||||
------------------------------------------------
|
||||
|
||||
Akka's logging is asynchronous which means that the timestamp of a log entry is taken from
|
||||
when the underlying logger implementation is called, which can be surprising at first.
|
||||
If you want to more accurately output the timestamp, use the MDC attribute ``akkaTimestamp``::
|
||||
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%X{akkaTimestamp} %-5level %logger{36} %X{akkaSource} - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
|
|
|||
|
|
@ -322,3 +322,17 @@ information is available in the MDC with attribute name ``akkaSource``::
|
|||
|
||||
For more details on what this attribute contains—also for non-actors—please see
|
||||
`How to Log`_.
|
||||
|
||||
|
||||
More accurate timestamps for log output in MDC
|
||||
------------------------------------------------
|
||||
|
||||
Akka's logging is asynchronous which means that the timestamp of a log entry is taken from
|
||||
when the underlying logger implementation is called, which can be surprising at first.
|
||||
If you want to more accurately output the timestamp, use the MDC attribute ``akkaTimestamp``::
|
||||
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%X{akkaTimestamp} %-5level %logger{36} %X{akkaSource} - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
Loading…
Add table
Add a link
Reference in a new issue