What are the latest options in Java logging frameworks?

SLF4J is the latest and greatest, as far as I know.

Surely the XML required to configure log4j couldn't be considered oppressive. You might be objecting to XML config in general, but even that's changing. Spring gives the option of using XML or annotations, as do most other frameworks. I think objecting to XML anything other than markup is going too far. Should Ant and NANT shut down because they chose XML? I think not.


wasn't logback the latest?


You have 3 options:

  • Log4J
  • java.util.logging (JUL)
  • Logback (the successor of Log4J)

Now, let's see how they meet your requirements:

  1. actively maintained
  2. reasonably powerful
  3. have a maven repo
  4. can be reconfigured without restarting your app
  5. don't tie you to XML

log4j:

  1. No, not actively maintained
  2. Yes -
  3. Yes -
  4. Yes -
  5. Yes (using Java properties file, see Configuration).

java.util.logging (JUL):

  1. I'd say Yes -
  2. at your discretion -
  3. N/A -
  4. Yes (via JMX or LogManager#readConfiguration() -
  5. Yes (using properties files)

Logback:

  1. Yes -
  2. Yes -
  3. Yes -
  4. Yes, via JMX or autoScan -
  5. Configuration files in XML or Groovy

It looks like you'll have to make some concessions (or find a framework I'm not aware of). I would go for Logback, this is where things happen now.