了解tomcat日志

了解tomcat日志

我作为支持工程师从事基于 Java 的应用程序的应用程序支持工作。

我想了解 tomcat 调试日志,以便我可以最终解决问题,而不必由于缺乏日志阅读知识而将其转发到下一层。

答案1

哈哈@Atul。根据我过去的经验,我的很多系统管理员都持消极态度。我认为这是一件好事。我猜你需要这种消极情绪来理解人们常犯的错误;在我的情况下,我就是这么接受的。

我知道 Tomcat 和 Apache 中的日志记录应该类似。我将使用 Apache 作为示例,因为大多数 Web 服务器在日志记录中都使用类似的方法。

开箱即用 Apache 没有为您提供大量日志记录或应用程序日志记录选项。您将需要仔细查看日志记录文档页面,以确保您尝试记录的内容的语法正确。

例如;在 CustomLog 中,您可以指定要记录的内容;当您收到日志并在您舒适的水平上进行调试时,在最后一行。

I would: 
 a) make sure what you're trying to log. 
 b) figure out if you need something from the app end or web server end to log 
    things specific 
 c) convert your needs to actual syntax; if it happens to be something 
    you can do on the web server end; you can accomplish all that in the 
    tomcat server config file.

相关内容