What is the easiest way to get started with log4j configuration?
In addition to some other answers, I would add a persistence appender since that's the greatest advantage of using logs over consoles and debuggers; when one can't run through the application code in real-time or the event already occurred.
!/"path"/"filename" will write to root of filesystem. "path"/"filename" will write to path relative to classpath root.
log4j.rootLogger = ALL, Console, default.file
log4j.appender.default.file=org.apache.log4j.FileAppender
log4j.appender.default.file.file={path}/{filename}
log4j.appender.default.file.layout=org.apache.log4j.PatternLayout
log4j.appender.default.file.layout.conversionPattern=%m%n
log4j.appender.Console=org.apache.log4j.ConsoleAppender
...