tomcat日志详解

1 tomcat 日志详解 1.1 tomcat 日志配置文件

  tomcat 对应日志的配置文件:tomcat目录下的/conf/logging.properties。

  tomcat 的日志等级有:日志输出级别:SEVERE (***别) > WARNING > INFO > CONFIG > FINE > FINER(精心) > FINEST (所有内容,最低级别)

  tomcat 有五类日志 :catalina、localhost、manager、admin、host-manager

  /conf/logging.properties 配置文件:

tomcat日志详解

tomcat日志详解

1 #可配置项(5类日志):catalina、localhost、manager、admin、host-manager 2 handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3 3manager.org.apache.juli.FileHandler, 4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler 4 5 #日志输出为输出到文件和输出到控制台 6 .handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler 7 8 #日志输出级别:SEVERE (***别) > WARNING > INFO > CONFIG > FINE > FINER(精心) > FINEST (所有内容,最低级别) 9 #配置文件使catalina日志输出级别为FINE 10 1catalina.org.apache.juli.FileHandler.level = FINE 11 #catalina文件输出位置 12 1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs 13 #catalina日志前缀为catalina 14 1catalina.org.apache.juli.FileHandler.prefix = catalina. 15 16 #配置文件使localhost日志输出级别为FINE 17 2localhost.org.apache.juli.FileHandler.level = FINE 18 #localhost文件输出位置 19 2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs 20 #localhost日志前缀为localhost 21 2localhost.org.apache.juli.FileHandler.prefix = localhost. 22 23 #配置文件使manager日志输出级别为FINE 24 3manager.org.apache.juli.FileHandler.level = FINE 25 #manager文件输出位置 26 3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs 27 #manager日志前缀为manager 28 3manager.org.apache.juli.FileHandler.prefix = manager. 29 30 #配置文件使host-manager日志输出级别为FINE 31 4host-manager.org.apache.juli.FileHandler.level = FINE 32 #host-manager文件输出位置 33 4host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs 34 #host-manager日志前缀为host-manager 35 4host-manager.org.apache.juli.FileHandler.prefix = host-manager. 36 37 #配置文件使控制台日志输出级别为FINE 38 java.util.logging.ConsoleHandler.level = FINE 39 #控制台日志输出格式 40 java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter 41 42 #localhost日志文件输出级别为INFO 43 org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO 44 #localhost日志文件输出处理类2localhost.org.apache.juli.FileHandler 45 org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler 46 47 #manager日志文件输出级别为INFO 48 org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO 49 #manager日志文件输出处理类3manager.org.apache.juli.FileHandler 50 org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.FileHandler 51 52 #host-manager日志文件输出级别为INFO 53 org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO 54 #host-manager日志文件输出处理类4host-manager.org.apache.juli.FileHandler 55 org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.FileHandler

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zgjxwy.html