Thursday, June 23, 2016

Tomcat log4j

logging.properties is configuration for java.util.logging. The java.util.logging API is still available, for those web applications that use it directly. The${catalina.base}/conf/logging.properties file is still referenced by Tomcat startup scripts.

  1. Globally  ${catalina.base}/conf/logging.properties.  
    adds several FileHandlers that write to files
  2. If 1) is not readable, fall back to the fault in JRE ${java.home}/lib/logging.properties file in the JRE. specifies a ConsoleHandler that routes logging to System.err. 
  3. In the web application. The file will be WEB-INF/classes/logging.properties

log4j.properties is for log4j.  $CATALINA_BASE/lib/log4j.properties

  • If log4j.jar exisit under catalina.base/lib, means using log4j. This exposes log4j libraries to the web applications through the Common classloader. Because of that, the web applications and libraries using Apache Commons Logging library are likely to automatically choose log4j as the underlying logging implementation.
  • Your web applications should certainly use their own log4j configuration. This is valid with the above configuration. You would place a similar log4j.properties file in your web application's WEB-INF/classes directory


Friday, June 17, 2016

Reset Git to a commit

1) set local to a certain commit
git reset --hard 3a10bf5

2) push to remote develop branch.
git push -f origin develop