• Post Reply Bookmark Topic Watch Topic
  • New Topic

questions on SLF4J: Defaulting to no-operation (NOP) logger implementation  RSS feed

 
cake naiyou
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After running some java program, the Eclipse compiler gives some error/waring messages such as

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation


I do not understand what does the
Defaulting to no-operation (NOP) logger implementation
mean here? Should I treat it as a warning or an error?

 
Wouter Oet
Bartender
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SLF4J is somewhat of an interface. It delegates the actual logging to another framework such as log4j or logback. When you get that message you didn't provided an implementation and SLF4J doesn't know where to log to. So it defaults to not logging. You'll need to provide an implementation on the classpath. I'd recommend logback (successor of log4j by the maker of log4j).
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!