FreeKB - How to switch between basic and HPEL logging in WebSphere
How to switch between basic and HPEL logging in WebSphere

Home > Search > How-to


By default, WebSphere will use basic logging. With basic logging, the application server will log events in the SystemOut.log, SystemErr.log, trace.log, and activity.log located at ${WAS_INSTALL_ROOT}/profiles/your_profile/logs/your_server/. With High Performance Extensible Logging (HPEL), there are three types of logs: HPEL log, HPEL trace, text.log.

The primary motivation for using HPEL logging instead of basic logging is to improve performance. Here are two ways that HPEL logging improves performance.

  • With basic logging, events are written to a number of different text files. On the other hand, HPEL writes events to a total of 3 log files.
  • Two of the three HPEL log files are in binary (1s and 0s). It takes much less CPU and memory to write in binary.

Ultimately, the performance improvements may improve the performance of applications, due to it taking less time, CPU, and memory to write events to the HPEL logs. The HPEL text.log has the same exact data as the HPEL binary logs. The HPEL text.log is only provided for convenience. Disabling the HPEL text log (more on that in a moment) can produce even more performance gains.

 


To enable HPEL logging

  1. In the left panel of the WebSphere web console, select Troubleshooting > Logs and trace.
  2. Select the server that you want to switch to HPEL.
  3. Select Switch to HPEL Mode.
  4. Select Save.

If enabling HPEL logging on a node, restart the node agent. If enabling HPEL on an application server, restart the application server. After restart, Logs and trace should display the 3 types of HPEL logs.

 


To enable basic logging

  1. In the left panel of the WebSphere web console, select Troubleshooting > Logs and trace.
  2. Select the server that you want to switch to HPEL.
  3. Select Change log and trace mode.
  4. Select Switch back to basic mode.
  5. Select Save.

 


Viewing the HPEL logs

The HPEL text.log can be viewed using any common text editor, such as notepad on Windows or vi on Linux. The HPEL log and HPEL trace logs are in binary format, thus these logs cannot be viewed with a text editor. Instead, the logViewer command is used to viewed the HPEL log and HPEL trace logs.

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter eb3d5 in the box below so that we can be sure you are a human.




Comments