Tomcat Src – tomcat logging

This is starting of tomcat source code analysis.

Tomcat Log is simple.

the following is main example on how to invoke tomcat logging

1
2
3
4
5
6
7
8
9
10
11
12
13
 
package main;
 
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
 
public class tomcat {
	public static void main(String[] args) {
		Log log = LogFactory.getLog(tomcat.class);
		log.info("this is a info message from tomcat");
		log.debug("this is a debug message from tomcat");
	}
}

but when debugging tomcat src, I find that org.apache.juli.ClassLoaderLogManager is invoked.

Its entry is in catalina.sh as starting up script for tomcat.

1
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager