http://ideoplex.com/id/386/controlling-hibernate-output-with-log4j
http://www.laliluna.de/articles/log4j-tutorial.html
http://juliusdavies.ca/logging.html
http://www.vaannila.com/log4j/log4j-configuration.html
import org.apache.log4j.Logger; public class YourClass { // Some people recommend against making this line static but Logger.getLogger() // is synchronized, so non-static can degrade performance. private static final Logger log = Logger.getLogger(YourClass.class) public void someMethod() { log.info("Your info message"); } }
Compress log file
http://jajatips.blogspot.com/2009/08/writing-compressing-file-appender-for.html
"yyyy-MM-dd/HH:mm:ss.SSS/zzz"