Thanks for going to the trouble of creating an example for me. So, the problem was the lack of '.withAttributes(ActorAttributes. createLogLevels(Logging.ErrorLevel(), Logging.ErrorLevel(), Logging.ErrorLevel())))'. Out of curiosity, was it that the default log levels were too low (i.e. something lower than DEBUG), or that needed to be done to log at all?
Also, I thought my example _was_ a full example, or did you mean something like what you did, an entire project? Like I said, I'm really new to slf4j, is there additional configuration that needs to be done for the 'simple' backend? On Tuesday, September 19, 2017 at 11:47:31 PM UTC-7, Konrad Malawski wrote: > > Please post full examples when trying to debug such things ;-) > I have to guess that you didn’t configure the actual logger. > Yet you did configure the logging filter, so things will try to use the > loggers config, but there is none, so empty. > > Works: http://github.com/ktoso/akka-logging-example > > — > Konrad `kto.so` Malawski > Akka <http://akka.io> @ Lightbend <http://lightbend.com> > > On 20 September 2017 at 08:30:53, Bwmat ([email protected] > <javascript:>) wrote: > > I have the following code > > public static void main(String[] args) throws InterruptedException > { > final Config configuration = ConfigFactory.load(ConfigFactory. > parseString( > "akka {" + > " loggers = [\"akka.event.slf4j.Slf4jLogger\"]\r\n" + > " loglevel = \"DEBUG\"\r\n" + > " logging-filter = > \"akka.event.slf4j.Slf4jLoggingFilter\"\r\n" + > "}")); > final ActorSystem system = ActorSystem.create("QuickStart", > configuration); > final Materializer materializer = ActorMaterializer.create(system > ); > > Source.single("hello").via(Flow.of(String.class).log("Hello")). > runWith(Sink.ignore(), materializer); > Thread.sleep(1000); > } > > I'm using the 'simple' ( > www.slf4j.org/apidocs/org/slf4j/impl/SimpleLogger.html ) binding for > slf4j. When I run the program, I see only one log line printed: > > QuickStart-akka.actor.default-dispatcher-2] INFO akka.event.slf4j. > Slf4jLogger - Slf4jLogger started > > I expect to see more, what am I missing? I'm very new to slf4j & logging > in akka/akka-streams > > Thanks, > Matthew w. > -- > >>>>>>>>>> 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 [email protected] <javascript:>. > To post to this group, send email to [email protected] > <javascript:>. > 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
