tomcat日志

可配置项(5类日志):

catalina、localhost、manager、admin、host-manager
handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler,
3manager.org.apache.juli.FileHandler, 4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler

日志输出为输出到文件和输出到控制台

.handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler

日志输出级别:

SEVERE (最高级别) > WARNING > INFO > CONFIG > FINE > FINER(精心) > FINEST (所有内容,最低级别)

配置文件catalina日志

输出级别为FINE
1catalina.org.apache.juli.FileHandler.level = FINE
输出位置
1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
前缀为catalina
1catalina.org.apache.juli.FileHandler.prefix = catalina.

配置文件localhost日志

输出级别为FINE
2localhost.org.apache.juli.FileHandler.level = FINE
输出位置
2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
前缀为localhost
2localhost.org.apache.juli.FileHandler.prefix = localhost.

配置文件manager日志

输出级别为FINE
3manager.org.apache.juli.FileHandler.level = FINE
输出位置
3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
前缀为manager
3manager.org.apache.juli.FileHandler.prefix = manager.

配置文件host-manager日志

输出级别为FINE
4host-manager.org.apache.juli.FileHandler.level = FINE
输出位置
4host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
前缀为host-manager
4host-manager.org.apache.juli.FileHandler.prefix = host-manager.

配置文件控制台日志

输出级别为FINE
java.util.logging.ConsoleHandler.level = FINE
输出格式
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter

localhost

日志文件输出级别为INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO
日志文件输出处理类2localhost.org.apache.juli.FileHandler
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler

manager

日志文件输出级别为INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO
日志文件输出处理类3manager.org.apache.juli.FileHandler
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.FileHandler

host-manager

日志文件输出级别为INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO
日志文件输出处理类4host-manager.org.apache.juli.FileHandler
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.FileHandler

你可能感兴趣的:(tomcat日志)