This article will focus on the JRas APIs required to create diagnostic traces.
本文将集中讨论创建诊断跟踪所需的JRasAPI。
Use JRas APIs in your applications to create useful diagnostic runtime traces.
在您的应用程序中使用JRasAPI创建有用的诊断运行时跟踪。
To generate information in diagnostic traces, user applications must use the JRas trace APIs.
要在诊断跟踪中生成信息,用户应用程序必须使用JRas跟踪API。
The bold parameters in Listing 1 are strings identifying the new logger objects to the JRas system.
清单1中粗体的参数是用于在JRas系统中标识新日志记录器对象的字符串。
In addition to creating diagnostic traces, the JRas APIs can be used to create custom activity (service) logs.
除了创建诊断跟踪,JRasAPI还可以用于创建用户活动(服务)日志。
This article has illustrated how to add basic JRas trace functionality to your WebSphere enterprise applications.
本文阐述了如何向您的WebSphere企业应用程序添加基本的JRas跟踪功能。
Make sure that you limit trace to just your package, since the application server itself contains many JRas messages.
因为应用程序服务器自身就包含许多JRas消息,所以请确保把跟踪限制到刚好适合您的包。
When adding a significant number of JRas calls to your application, you'll want to consider the effects on performance.
向您的应用程序添加大量的JRas调用时,您就需要考虑对性能的影响。
Four records in particular, highlighted above, represent the JRas trace APIs used from within the MyEnterprise application.
四个特殊的纪录被高亮显示,这四个记录表示了MyEnterprise应用程序对JRastraceAPI的使用。
The article Getting started with JRas: Adding trace and message logging to WebSphere Applications describes both techniques in detail.
把跟踪日志记录和消息日志记录添加到WebSphere应用程序中详细描述了这两种方法。
Be sure to see the WebSphere InfoCenter for information on additional trace operations, as well as how to extend the JRas system itself.
请务必参阅WebSphere信息中心获取关于附加的跟踪操作以及如何扩展JRas系统自身的信息。
JRas lets you to turn on diagnostic information when problems arise, producing trace logs to help identify unexpected conditions or programming errors.
JRas让您在问题出现时可以打开诊断信息,它将生成跟踪日志来帮助识别意料之外的情况或程序错误。
Adding JRas logging to all an application's classes allows WebSphere administrators to conveniently generate trace files documenting problems that arise.
把JRas日志记录添加到一个应用程序的所有类中,WebSphere管理员就可以方便地生成跟踪文件,用它记录出现的问题。
At the bottom of this article, you can download a simple J2EE Web application that demonstrates the use of JRas APIs to log trace messages. After you download the file.
您可以在本文的顶部下载范例J2EEWeb应用程序,该程序演示了使用JRasAPI来纪录跟踪消息。
The article Getting started with JRas: Adding trace and message logging to WebSphere applications describes in detail how to generate useful diagnostic traces using JRas APIs.
从JRas起步:把跟踪日志记录和消息日志记录添加到WebSphere应用程序中详细描述了如何使用JRasAPI生成有用的诊断跟踪。
This time, when you run MyEnterpriseServlet, useful diagnostic trace information will appear in the trace logs based on your use of the JRas APIs in the MyEnterprise application.
这一次,当您运行MyEnterpriseServlet 时,有用的诊断跟踪信息将出现在跟踪日志中,这些跟踪日志基于MyEnterprise应用程序中对JRasAPI的使用。
The sample application provided USES the JRas APIs to log trace events to create a diagnostic trace for analysis. The four types of events logged in the sample application include.
范例应用程序为用户提供了用于纪录跟踪事件的JRasAPI,以创建用于分析的诊断跟踪。
After the import is complete, you will notice that errors appear in the Tasks list because the Web project, MyEnterpriseWeb, USES the JRas APIs found in the ras.jar library provided by WebSphere.
导入完成以后,您将发现Tasks列表中显示一个错误,这是因为Web项目MyEnterpriseWeb使用了WebSphere提供的ras . jar库中的JRasAPI。
After the import is complete, you will notice that errors appear in the Tasks list because the Web project, MyEnterpriseWeb, USES the JRas APIs found in the ras.jar library provided by WebSphere.
导入完成以后,您将发现Tasks列表中显示一个错误,这是因为Web项目MyEnterpriseWeb使用了WebSphere提供的ras . jar库中的JRasAPI。
应用推荐