WAS 服务器日志与跟踪日志

发布于 2024-12-13 05:49:26 字数 199 浏览 1 评论 0 原文

在此链接http://en.wikipedia.org/wiki/Tracing_(software)他们指出了服务器日志和跟踪日志之间的差异。作为开发人员,我一直对服务器日志感到满意,而从不需要跟踪日志。什么情况需要查看跟踪日志?

At this link http://en.wikipedia.org/wiki/Tracing_(software) they point out differences between server logs and trace logs. As a developer, I have always been sufficed by server logs and never needed trace logs. What situations require looking into trace logs?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

云雾 2024-12-20 05:49:26

正如 @bkail 提到的,WebSphere Application Server 的内置服务器跟踪通常用于 IBM 支持。它通常粒度太细,并且与 IBM 的封闭源代码紧密耦合,无法供客户使用。

然而,跟踪日志也可用于应用程序支持。如果您的应用程序使用 java.lang. util.logging,这些日志事件将被写入WAS的日志文件(例如SystemOut.logtrace.log)。写入 SystemOut.log 的日志消息 (Level.CONFIG 及更高版本)通常适用于系统管理员。写入 trace.log 的日志消息 (Level.FINE 及更低)是通常用于开发人员或故障排除的消息,调试目的;这些消息可能与代码紧密结合,或者包含在故障排除情况下有用的大量诊断信息。一般来说,您只需要 启用跟踪,因为这种类型的大量日志记录可能成本高昂,并且可能会影响应用程序的性能。

作为开发人员,您应该对面向系统管理员的日志记录和面向开发人员或故障排除的日志记录(跟踪)进行一流的区分。日志记录是与系统管理员沟通的一种很好的方法,并且对于故障排除非常有用,但是每个用例都应该以不同的方式处理。这是日志记录 API(包括 java.util.logging)提供多个 日志记录级别您引用的文章似乎在区分日志记录和跟踪方面做得很好(其中在 WAS 中转换为 SystemOut.logtrace.log)。 IBM 的文档 还很好地概述了这些差异。

As @bkail mentions, WebSphere Application Server's built-in server tracing is typically for IBM support. It is generally too fine-grained and tightly coupled with IBM's closed source code to be of use to customers.

However, there are also uses of the trace logs for application support as well. If your application utilizes java.util.logging, these log events will be written to WAS's log files (e.g. SystemOut.log, trace.log). The log messages written to SystemOut.log (Level.CONFIG and higher) are typically intended for system administrators. Log messages written to trace.log (Level.FINE and lower), on the other hand, are messages that are typically intended for developers or troubleshooting and debugging purposes; these messages may be tightly coupled with the code or contain extensive diagnostic information useful in troubleshooting situations. Generally, you only want to enable tracing during troubleshooting or development, as this type of extensive logging can be expensive and potentially impact the performance of your applications.

As a developer, you should make a first-class distinction between logging intended for your system administrators and logging (tracing) intended for developers or troubleshooting. Logging is a great method for communicating with system administrators and can be an invaluable for troubleshooting, but each of these use cases should be handled differently. This is one of the primary reasons that logging APIs (including java.util.logging) provide multiple logging levels. The article you referenced seems to do a great job distinguishing between logging and tracing (which translates to SystemOut.log and trace.log in WAS). IBM's documentation also provides a good overview of the differences.

别低头,皇冠会掉 2024-12-20 05:49:26

Trace 主要由 IBM 的 WebSphere Application Server 支持人员使用。该产品的客户很少会自己启用跟踪。

Trace is primarily used by WebSphere Application Server support at IBM. Customers of that product would very rarely enable trace themselves.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文