Top "Log4j" questions

log4j is a popular Java-based logging utility.

Need a working example of configuring log4j RollingFileAppender via properties

I am using log4j for logging, and a property file for configuration. Currently, my log files are too big (3.5 …

log4j rollingfileappender
Java Logging vs Log4J

Is it still worth to add the log4j library to a Java 5 project just to log let's say some …

java logging log4j java.util.logging
Log4j: Why is the root logger collecting all log types regardless the configuration?

I am having problem that even though I specify the level to ERROR in the root tag, the specified appender …

java logging log4j
Why calling LoggerFactory.getLogger(...) every time is not recommended?

I've read tons of posts and documents (on this site and elsewhere) pointing that the recommended pattern for SFL4J …

java logging log4j logback slf4j
Compress Log4j files

Is it possible to compress log files (I doing it via RollingFileAppender )?

java properties log4j
Using system environment variables in log4j xml configuration

Is it possible to reference system environment variables (as opposed to Java system properties) in a log4j xml configuration …

java xml configuration log4j environment-variables
How can I test with junit that a warning was logged with log4j?

I'm testing a method that logs warnings when something went wrong and returns null. something like: private static final Logger …

java unit-testing logging junit log4j
log4j not printing the stacktrace for exceptions

I am using log4j with tomcat. When I log exceptions in my JSPs, servlets: private Logger _log = Logger.getLogger(…

java tomcat logging log4j
Getting stacktrace in logger

I am using log4j to log my exceptions. I want to log whatever I get in e.printStackTrace(); My …

java log4j stack-trace
How to create my own Appender in log4j?

I am new in log4j. Can anyone explain how to create my own Appender? i.e. how to implement …

java log4j appender