Usage of log4J levels
问题 What is the best practice in using log4j levels while coding. I mean when do we use INFO logging, when do we use DEBUG logging / ERROR logging etc. 回答1: The best way to learn is by example. Read source of some open source things, like, oh, Tomcat or whatever is in your application area, and see what you see. 回答2: In general, I follow these guidelines: DEBUG : low level stuff. cache hit, cache miss, opening db connection INFO : events that have business meaning - creating customer, charging cc