You can always just us slf4j directly - use an async appender in the impl
(logback2 AFAIR provides one and others as well) and you're good.

There's no requirement to use ActorLogging, we only have it to not depend
on a specific logging API in akka-actor itself.

-- 
Konrad `ktoso` Malawski
Akka <http://akka.io> @ Lightbend <http://lightbend.com>

On 19 June 2017 at 15:28:35, Natanel Savion (natanel.sav...@gmail.com)
wrote:

Hi,
While using in akka's infrastructure (akka.event.Logging), log lines are
written asynchronously.
If 3rd party code that writes directly to SLF4J runs within the context of
an actor, this can lead to condition where akka code performed before the
3rd party code only gets logged after the 3rd party log due to the time it
takes the logs to be written async.

%X{akkaTimestamp} (see
*http://doc.akka.io/docs/akka/current/java/logging.html#more-accurate-timestamps-for-log-output-in-mdc
<http://doc.akka.io/docs/akka/current/java/logging.html#more-accurate-timestamps-for-log-output-in-mdc>*)
can be used to reorder the log but sometimes the timestamp resolution is
not sufficient to reliably order the lines.

Was wondering if someone else may have encountered this problem and
came-up with some solution.
Currently, we are considering writing all our logs directly to SLF4J to
avoid this issue (the SLF4J back-end can be configured with an async
appender to provide similar functionality).

Thanks,
Nati




--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups
"Akka User List" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to