tomcat 日誌詳解

1 tomcat  日誌詳解

1.1  tomcat 日誌配置文件

  tomcat 對應日誌的配置文件:tomcat目錄下的/conf/logging.properties。css

  tomcat 的日誌等級有:日誌輸出級別:SEVERE (最高級別) > WARNING > INFO > CONFIG > FINE > FINER(精心) > FINEST (全部內容,最低級別)html

  tomcat  有五類日誌 :catalina、localhost、manager、admin、host-managerjava

  /conf/logging.properties 配置文件:web

 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
View Code

1.2  tomcat 日誌文件詳解

 tomcat  有五類日誌 :catalina、localhost、manager、admin、host-managerapache

 1.2.1 catalina.out :

catalina.out即標準輸出和標準出錯,全部輸出到這兩個位置的都會進入catalina.out,這裏包含tomcat運行本身輸出的日誌以及應用裏向console輸出的日誌。默認這個日誌文件是不會進行自動切割的,咱們須要藉助其餘工具進行切割(注意:catalina.out文件若是過大會影響)tomcat

#截取部分日誌
19-Sep-2018 09:53:28.358 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.0.53
19-Sep-2018 09:53:28.361 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Jun 29 2018 14:42:45 UTC
19-Sep-2018 09:53:28.361 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.0.53.0
19-Sep-2018 09:53:28.361 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Linux
19-Sep-2018 09:53:28.361 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            3.10.0-862.el7.x86_64
19-Sep-2018 09:53:28.361 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
19-Sep-2018 09:53:28.361 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /usr/java/jdk1.8.0_131/jre
19-Sep-2018 09:53:28.361 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_131-b11
19-Sep-2018 09:53:28.361 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
19-Sep-2018 09:53:28.361 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /opt/tomcat
19-Sep-2018 09:53:28.361 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /opt/tomcat
19-Sep-2018 09:53:28.361 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties
19-Sep-2018 09:53:28.362 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
19-Sep-2018 09:53:28.362 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
19-Sep-2018 09:53:28.362 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
19-Sep-2018 09:53:28.362 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
19-Sep-2018 09:53:28.362 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/opt/tomcat
19-Sep-2018 09:53:28.362 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/opt/tomcat
19-Sep-2018 09:53:28.362 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/opt/tomcat/temp
19-Sep-2018 09:53:28.362 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
19-Sep-2018 09:53:28.676 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
19-Sep-2018 09:53:28.716 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
19-Sep-2018 09:53:28.731 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
19-Sep-2018 09:53:28.732 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
19-Sep-2018 09:53:28.746 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1083 ms
19-Sep-2018 09:53:28.794 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
19-Sep-2018 09:53:28.794 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.53
19-Sep-2018 09:53:28.829 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/tomcat/webapps/ROOT
19-Sep-2018 09:53:29.524 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /opt/tomcat/webapps/ROOT has finished in 694 ms
19-Sep-2018 09:53:29.524 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/tomcat/webapps/docs
19-Sep-2018 09:53:29.552 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /opt/tomcat/webapps/docs has finished in 28 ms
19-Sep-2018 09:53:29.552 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/tomcat/webapps/examples
19-Sep-2018 09:53:29.987 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /opt/tomcat/webapps/examples has finished in 434 ms
19-Sep-2018 09:53:29.987 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/tomcat/webapps/host-manager
19-Sep-2018 09:53:30.033 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /opt/tomcat/webapps/host-manager has finished in 46 ms
19-Sep-2018 09:53:30.034 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/tomcat/webapps/manager
19-Sep-2018 09:53:30.064 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /opt/tomcat/webapps/manager has finished in 29 ms
19-Sep-2018 09:53:30.082 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
19-Sep-2018 09:53:30.099 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
19-Sep-2018 09:53:30.106 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 1360 ms
2018-09-19 16:52:10
 [] [] [INFO]-[Thread: DefaultQuartzScheduler_Worker-7] 開始檢查系統
View Code

    1.2.2 catalina.YYYY-MM-DD.log

 catalina.{yyyy-MM-dd}.log是tomcat本身運行的一些日誌,這些日誌還會輸出到catalina.out,可是應用向console輸出的日誌不會輸出到catalina.{yyyy-MM-dd}.log,它是tomcat的啓動和暫停時的運行日誌,注意,它和catalina.out是裏面的內容是不同的。app

19-Sep-2018 07:03:18.713 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
19-Sep-2018 07:03:18.713 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8009"]
19-Sep-2018 07:03:18.713 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service Catalina
19-Sep-2018 07:03:18.741 INFO [1] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
19-Sep-2018 07:03:18.741 INFO [1] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]
19-Sep-2018 07:03:18.741 INFO [1] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-nio-8009"]
19-Sep-2018 07:03:18.741 INFO [1] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["ajp-nio-8009"]
19-Sep-2018 09:53:13.515 INFO [main] org.apache.catalina.core.StandardServer.await A valid shutdown command was received via the shutdown port. Stopping the Server instance.
19-Sep-2018 09:53:13.518 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
19-Sep-2018 09:53:13.589 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8009"]
19-Sep-2018 09:53:13.643 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service Catalina
19-Sep-2018 09:53:13.743 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
19-Sep-2018 09:53:13.749 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-nio-8009"]
19-Sep-2018 09:53:13.757 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]
19-Sep-2018 09:53:13.760 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["ajp-nio-8009"]
19-Sep-2018 09:53:28.358 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.0.53
19-Sep-2018 09:53:28.361 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Jun 29 2018 14:42:45 UTC
19-Sep-2018 09:53:28.361 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.0.53.0
19-Sep-2018 09:53:28.361 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Linux
19-Sep-2018 09:53:28.361 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            3.10.0-862.el7.x86_64
19-Sep-2018 09:53:28.361 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
19-Sep-2018 09:53:28.361 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /usr/java/jdk1.8.0_131/jre
19-Sep-2018 09:53:28.361 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_131-b11
19-Sep-2018 09:53:28.361 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
19-Sep-2018 09:53:28.361 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /opt/tomcat
19-Sep-2018 09:53:28.361 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /opt/tomcat
19-Sep-2018 09:53:28.361 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties
19-Sep-2018 09:53:28.362 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
19-Sep-2018 09:53:28.362 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
19-Sep-2018 09:53:28.362 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
19-Sep-2018 09:53:28.362 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
19-Sep-2018 09:53:28.362 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/opt/tomcat
19-Sep-2018 09:53:28.362 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/opt/tomcat
19-Sep-2018 09:53:28.362 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/opt/tomcat/temp
19-Sep-2018 09:53:28.362 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
19-Sep-2018 09:53:28.676 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
19-Sep-2018 09:53:28.716 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
19-Sep-2018 09:53:28.731 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
19-Sep-2018 09:53:28.732 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
19-Sep-2018 09:53:28.746 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1083 ms
19-Sep-2018 09:53:28.794 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
19-Sep-2018 09:53:28.794 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.53
19-Sep-2018 09:53:28.829 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/tomcat/webapps/ROOT
19-Sep-2018 09:53:29.524 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /opt/tomcat/webapps/ROOT has finished in 694 ms
19-Sep-2018 09:53:29.524 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/tomcat/webapps/docs
19-Sep-2018 09:53:29.552 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /opt/tomcat/webapps/docs has finished in 28 ms
19-Sep-2018 09:53:29.552 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/tomcat/webapps/examples
19-Sep-2018 09:53:29.987 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /opt/tomcat/webapps/examples has finished in 434 ms
19-Sep-2018 09:53:29.987 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/tomcat/webapps/host-manager
19-Sep-2018 09:53:30.033 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /opt/tomcat/webapps/host-manager has finished in 46 ms
19-Sep-2018 09:53:30.034 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/tomcat/webapps/manager
19-Sep-2018 09:53:30.064 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /opt/tomcat/webapps/manager has finished in 29 ms
19-Sep-2018 09:53:30.082 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
19-Sep-2018 09:53:30.099 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
19-Sep-2018 09:53:30.106 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 1360 ms
View Code

 1.2.3 localhost.YYYY-MM-DD.log

 localhost.{yyyy-MM-dd}.log主要是應用初始化(listener, filter, servlet)未處理的異常最後被tomcat捕獲而輸出的日誌,它也是包含tomcat的啓動和暫停時的運行日誌,但它沒有catalina.2018-09-19.log 日誌全。它只是記錄了部分日誌。webapp

19-Sep-2018 03:57:15.287 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
19-Sep-2018 03:57:15.287 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
19-Sep-2018 03:57:15.288 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: attributeAdded('StockTicker', 'async.Stockticker@2f62fc5f')
19-Sep-2018 07:03:18.568 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
19-Sep-2018 07:03:18.568 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
19-Sep-2018 07:03:18.569 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: attributeAdded('StockTicker', 'async.Stockticker@22890441')
19-Sep-2018 07:03:18.732 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextDestroyed()
19-Sep-2018 07:03:18.732 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextDestroyed()
19-Sep-2018 09:53:13.707 INFO [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log SessionListener: contextDestroyed()
19-Sep-2018 09:53:13.707 INFO [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log ContextListener: contextDestroyed()
19-Sep-2018 09:53:29.980 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
19-Sep-2018 09:53:29.981 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
19-Sep-2018 09:53:29.982 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: attributeAdded('StockTicker', 'async.Stockticker@46012cd1')
View Code

 1.2.4 localhost_access_log.YYYY-MM-DD.txt

 localhost_access_log.2018-09-19.txt:這個是訪問tomcat的日誌,請求時間和資源,狀態碼都有記錄。async

192.168.1.220 - - [19/Sep/2018:03:57:42 -0400] "GET / HTTP/1.1" 200 11286
192.168.1.220 - - [19/Sep/2018:03:57:42 -0400] "GET /tomcat.css HTTP/1.1" 200 5581
192.168.1.220 - - [19/Sep/2018:03:57:42 -0400] "GET /tomcat.png HTTP/1.1" 200 5103
192.168.1.220 - - [19/Sep/2018:03:57:42 -0400] "GET /bg-button.png HTTP/1.1" 200 713
192.168.1.220 - - [19/Sep/2018:03:57:42 -0400] "GET /bg-nav.png HTTP/1.1" 200 1401
192.168.1.220 - - [19/Sep/2018:03:57:42 -0400] "GET /asf-logo-wide.svg HTTP/1.1" 200 27235
192.168.1.220 - - [19/Sep/2018:03:57:42 -0400] "GET /bg-middle.png HTTP/1.1" 200 1918
192.168.1.220 - - [19/Sep/2018:03:57:42 -0400] "GET /bg-upper.png HTTP/1.1" 200 3103
192.168.1.220 - - [19/Sep/2018:03:58:14 -0400] "GET / HTTP/1.1" 200 11286
192.168.1.220 - - [19/Sep/2018:03:58:14 -0400] "GET /favicon.ico HTTP/1.1" 200 21630
192.168.1.220 - - [19/Sep/2018:03:58:16 -0400] "GET / HTTP/1.1" 200 11286
192.168.1.220 - - [19/Sep/2018:03:58:16 -0400] "GET /favicon.ico HTTP/1.1" 200 21630
192.168.1.220 - - [19/Sep/2018:03:58:21 -0400] "GET / HTTP/1.1" 200 11286
192.168.1.220 - - [19/Sep/2018:03:58:21 -0400] "GET /favicon.ico HTTP/1.1" 200 21630
192.168.1.220 - - [19/Sep/2018:03:58:28 -0400] "GET /docs/setup.html HTTP/1.1" 200 14470
192.168.1.220 - - [19/Sep/2018:03:58:28 -0400] "GET /docs/images/docs-stylesheet.css HTTP/1.1" 200 5780
192.168.1.220 - - [19/Sep/2018:03:58:28 -0400] "GET /docs/images/tomcat.png HTTP/1.1" 200 5103
192.168.1.220 - - [19/Sep/2018:03:58:28 -0400] "GET /docs/images/asf-logo.svg HTTP/1.1" 200 20486
192.168.1.220 - - [19/Sep/2018:03:58:28 -0400] "GET /docs/images/fonts/fonts.css HTTP/1.1" 200 1943
192.168.1.220 - - [19/Sep/2018:03:58:29 -0400] "GET /docs/images/fonts/OpenSans400.woff HTTP/1.1" 200 21956
192.168.1.220 - - [19/Sep/2018:03:58:29 -0400] "GET /docs/images/fonts/OpenSans700.woff HTTP/1.1" 200 22748
192.168.1.220 - - [19/Sep/2018:03:58:29 -0400] "GET /docs/images/fonts/OpenSans600.woff HTTP/1.1" 200 22604

 1.2.5 host-manager.YYYY-MM-DD.log

    host-manager.2018-09-19.log:這個估計是放tomcat的自帶的manager項目的日誌信息的,未看到有什麼重要的日誌信息。ide

  1.2.6 manager.YYYY-MM-DD.log

   manager.2018-09-19.log  : 這個是tomcat manager項目專有的日誌文件.

1.3 tomcat  日誌文件切割

  tomcat  的  catalina.out  文件tomcat 是不會進行日誌切割的,當這個文件大於2G  時,會影響tomcat的運行。那麼咱們須要對這個文件進行日誌切割,切割的方法有不少種:

  第一種:

  經過系統自帶的切割工具:logrotate來進行切割。

  第二種:

  使用logj4進行切割日誌。

  第三種:

  使用用cronolog分割tomcat的catalina.out文件 

  以上三種方法見:https://www.cnblogs.com/happy-king/p/9193401.html

相關文章
相關標籤/搜索