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
#catalina文件输出位置
1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
#catalina日志前缀为catalina
1catalina.org.apache.juli.FileHandler.prefix = catalina.

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

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

#配置文件使host-manager日志输出级别为FINE
4host-manager.org.apache.juli.FileHandler.level = FINE
#host-manager文件输出位置
4host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
#host-manager日志前缀为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
#localhost日志文件输出处理类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
#manager日志文件输出处理类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
#host-manager日志文件输出处理类4host-manager.org.apache.juli.FileHandler
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.FileHandler




你可能感兴趣的:(tomcat,日志,web服务器,java日志,tomcat日志)