I am developing a simple server using Akka and Akka-http.
I always get following error message in stdout when I run application into IntelliJ:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
I have the following dependencies in build.gradle:
compile 'org.scala-lang:scala-library:2.12.1'
compile 'com.typesafe.akka:akka-actor_2.12:2.4.17'
compile 'com.typesafe.akka:akka-stream_2.12:2.4.17'
compile 'com.typesafe.akka:akka-http_2.12:10.0.4'
compile 'com.typesafe.akka:akka-http-spray-json_2.12:10.0.4'
compile 'com.typesafe.akka:akka-slf4j_2.12:2.4.17'
And I have application.conf as given below:
akka {
loggers = ["akka.event.slf4j.Slf4jLogger"]
loglevel = "INFO"
stdout-loglevel = "INFO"
logging-filter = "akka.event.slf4j.Slf4jLoggingFilter"
...
}
And finally, I am using Logging like this:
object HttpServer extends App with JsonSupport {
override def main(args: Array[String]): Unit = {
val config = ConfigFactory.load()
implicit val system = ActorSystem(config.getString("application.actor-system"))
implicit val materializer = ActorMaterializer()
// needed for the future flatMap/onComplete in the end
implicit val executionContext = system.dispatcher
val logger = Logging(system, getClass)
Can anyone know why I always get that errors statements?