How to switch between basic and HPEL logging in WebSphere

Home > Search > How-to
  by

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. With High Performance Extensible Logging HPEL, there are three types of logs: HPEL log, HPEL trace, text.log.


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 text.log can be used with a normal text editor program, such as the vi editor. The LogViewer command must be used to view the HPEL log and HPEL trace log, because these logs are in binary format. The LogViewer command converts the files from binary to text. 

~]# /opt/IBM/WebSphere/AppServer/profiles/profile01/bin/logViewer.sh
[3/14/18 20:13:23:123 CDT] 0000009f ServletWrappe I com.ibm.webcontainer.servlet.ServletWrapper init SRV0242EI: [Beta_war] [/beta] [com.main.servlet.Results]: Initialization successful. 

 

It is fairly common to use the outLog, startDate, and stopDate options, to write the output to a file and to limit the results to a certain date range.

~]# /opt/IBM/WebSphere/AppServer/bin/logViewer.sh -outLog /tmp/file1.txt -startDate "01/01/2018 09:00:00:000 CDT" -stopDate "01/01/2018 10:00:00:000 CDT"

 

It is also fairly common to specify the minimum log level, so that only events at and above a certain log level are displayed.

~]# /opt/IBM/WebSphere/AppServer/bin/logViewer.sh -minLevel WARNING

 



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 in the box below so that we can be sure you are a human.




Comments