[akka-user] Re: About logging in Akka application

2017-02-03 Thread Dai Yinhua
Thank you Rafal. On Thursday, 2 February 2017 23:01:04 UTC+8, Rafał Krzewski wrote: > > What I mean is completely standard SLF4J usage like: > > import org.slf4j.LoggerFactory > val logger = LoggerFactory.getLogger(classOf[MyClass]) > logger.info("hello") > > It should just work. akka-slf4j redire

[akka-user] Re: About logging in Akka application

2017-02-02 Thread Rafał Krzewski
What I mean is completely standard SLF4J usage like: import org.slf4j.LoggerFactory val logger = LoggerFactory.getLogger(classOf[MyClass]) logger.info("hello") It should just work. akka-slf4j redirects Akka log event stream to slf4j so log entries from akka.event.LoggingAdapter and org.slf4j.Log

[akka-user] Re: About logging in Akka application

2017-02-01 Thread Dai Yinhua
Hi Rafal, Do you have some sample code of using the SLF4J API directly? The only different with using Akka event stream is the way to construct the logger object? Thank you. -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >> http://doc.akka.io/do

[akka-user] Re: About logging in Akka application

2017-02-01 Thread Rafał Krzewski
Hi Yinhua, First of all, you could model all elements of your system as Actors and the Main class would just start an ActorSystem, instantiate your top level Actor and then wait for it's termination. If this is not feasible, non-Actor parts of the application do have a reference to the ActorSys