4

Essentially I'm looking for something with the same behavior, configuration, logging levels as log4j, but with some of the missing functionality (e.g. formatted logging — see here and here for related SO threads.)

Current nominees are slf4j and log5j.

Community
  • 1
  • 1
ripper234
  • 222,824
  • 274
  • 634
  • 905

3 Answers3

12

I'm inclined toward SLF4J.

log5j is good, but does not have near as much market penetration.

Chadwick
  • 12,555
  • 7
  • 49
  • 66
3

since a lot of frameworks already support slf4j you will only have to setup your logging once with slf4j.

i use slf4j and it is super-easy to read + use.

Andreas Petersson
  • 16,248
  • 11
  • 59
  • 91
3

I'd also suggest SLF4J, ideally with Logback. Take a look at What’s Up with Logging in Java? and Find a way in the java logging frameworks scene., too.

Community
  • 1
  • 1
Huxi
  • 4,242
  • 3
  • 33
  • 31