What's the difference between localhost.log, catalina.log, manager.log, host-manager.log ?

ぐ巨炮叔叔 提交于 2019-12-04 09:08:15

问题


I'm using Tomee. The logs folder contains files like this

  1. localhost_access_log.2016-12-02.txt
  2. localhost.2016-12-02.log
  3. catalina.2016-12-02.log
  4. host-manager.2016-12-02.log
  5. manager.2016-12-02.log

I was looking for an explanation in the documentation but could find anything. It's my understanding that those localhost files log only the 'host computer' activity. It this right? What is the difference between these file? Do they record different types of messages?


回答1:


you can find all detail in conf/logging.properties and conf/server.xml for the access log.

In short

  • catalina is the container log file,
  • localhost_access (only one defined in server.xml) the access log (= all requests like in httpd),
  • localhost the log of the host and finally
  • host-manager and manager the logs of the related web applications.

Here a commented example to try to help you read logging.propertues:

# log on the host "localhost"
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].xxx

# log on the host "localhost" for the webapp foo
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/foo].xxx

More generally the pattern is:

org.apache.catalina.core.ContainerBase.[${engine}].[${host}].[${context}]

Side note: ${context} is "/" for the root context.

This syntax applies for ServletContext logging

All is explained https://tomcat.apache.org/tomcat-8.5-doc/logging.html



来源:https://stackoverflow.com/questions/40935536/whats-the-difference-between-localhost-log-catalina-log-manager-log-host-man

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!