![]() | |
|
Changing the logging and tracing options
You might want to customize the logging and tracing properties for the new application server. There are several ways to access the logging and tracing properties for an application server.
Select Troubleshooting > Logs and Trace in the navigation bar, then select a server.
Select Servers > Server Types > WebSphere application servers, select a server, and then select Logging and Tracing from the Troubleshooting section.
Select Servers > Server Types > WebSphere application servers, select a server, select Process definition from the Java and Process Management section. Select Logging and Tracing from the Additional Properties section.
We will take the third navigation path to customize the location of the JVM logs, the diagnostic trace logs, and the process logs.
Select Logging and Tracing.
Select JVM Logs.
This allows you to change the JVM standard output and error file properties.
Both are rotating files. You can choose to save the current file and create a
new one, either when it reaches a certain size, or at a specific moment during
the day. You can also choose to disable the output of calls to
System.out.print()
or System.err.print()
.
We recommend that you specify a new file name, using an environment variable to specify it, such as:
${APPLICATION_ROOT}/logs/SystemOut.log
${APPLICATION_ROOT}/logs/SystemErr.log
On this page you can also modify how WebSphere will rotate your log files.
Click OK.
Select Diagnostic Trace.
Each component of the WebSphere Application Server is enabled for tracing with the JRas interface. This trace can be changed dynamically while the process is running using the Runtime tab, or added to the application server definition from the Configuration tab. As shown in figure below, the trace output can be either directed to memory or to a rotating trace file.
Change the trace output file name so the trace is stored in a specific location
for the server using the ITSOBANK_ROOT
variable and select the
Log Analyzer format.
Click OK.
Select Process Logs.
Messages written by native code (JNI) to standard out and standard error
streams are redirected by WebSphere to process logs, usually called
native_stdout.log
and native_stderr.log
. Change the
native process logs to:
${APPLICATION_ROOT}/logs/native_stdout.log
${APPLICATION_ROOT}/logs/native_stderr.log
Click OK.
All log files produced by the application server are now redirected to the
${APPLICATION_ROOT}/logs
directory. Save the configuration.
Log levels
Levels control which events are processed by Java logging. WebSphere Application Server controls the levels of all loggers in the system.
The level value is set from configuration data when the logger is created and can be changed at run time from the administrative console. If a level is not set in the configuration data, a level is obtained by proceeding up the hierarchy until a parent with a level value is found. You can also set a level for each handler to indicate which events are published to an output device. When you change the level for a logger in the administrative console, the change is propagated to the children of the logger.
Levels are cumulative; a logger can process logged objects at the level that is set for the logger, and at all levels above the set level.
Valid log levels:
Off - No events are logged.
Fatal - Task cannot continue and component cannot function.
Severe - Task cannot continue, but component can still function.
Warning - Potential error or impending error.
Audit - Significant event affecting server state or resources.
Info - General information outlining overall task progress.
Config - Configuration change or status.
Detail - General information detailing subtask progress.
Fine - Trace information - General trace.
Finer -Trace information - Detailed trace + method entry / exit / return values.
Finest - Trace information - A more detailed trace - Includes all the detail that is needed to debug problems.
All - All events are logged. If you create custom levels, All includes your custom levels, and can provide a more detailed trace than Finest.
NOTE: Trace information, which includes events at the Fine, Finer and Finest levels, can be written only to the trace log. Therefore, if you do not enable diagnostic trace, setting the log detail level to Fine, Finer, or Finest does NOT effect the logged data.
![]() ![]() ![]() |