I believe the popularity ranking is:
1) logback
2) log4j 2.x
3) jul
4) log4j 1.x (obsolete, deprecated)
What is logback? I've seen this and thought it was just an older version of the log4j.
I haven't heard of a jul logging.
@Log4j2 annotation is a Lombok feature I believe, so only
a possibility for those using Lombok.
Is the annotation just a shorter version of that one line factory statement or is there another benefit?
Do you use log4j2 or something else?
How do you redirect the catalina logs to a file? If I have log4j2.xml
in the tomcat folder, it appears to be ignoring the log4j2.xml in the application folder.
Do you use log4j2.xml? This appears to be the popular setup, but the
last application I worked with had many different project for pieces
of the one big application, so I put them all under one master
project and had the spring framework call the API to configure on
startup, seemed easier than using xml files especially if the
sub-projects can share and would each need their own xml file.
Do you use the static method at the start of each class Logger log = LoggerFactory.getLogger() or the @Log4j2 annotation, or is there
another better way?
I believe the popularity ranking is:
1) logback
2) log4j 2.x
3) jul
4) log4j 1.x (obsolete, deprecated)
The big benefit of configuration files over programmatic
configuration is that it allows operations to change logging
without requiring help from software engineering.
@Log4j2 annotation is a Lombok feature I believe, so only
a possibility for those using Lombok.
Arne
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 415 |
Nodes: | 16 (2 / 14) |
Uptime: | 156:15:42 |
Calls: | 8,706 |
Files: | 13,267 |
Messages: | 5,951,098 |