HPEL is a log and trace facility that
you can use in stand-alone and WebSphere® Application Server environments. You can use HPEL to store and access log, trace, System.err, and System.out information
produced by the application server or applications. HPEL is an alternative
to the basic log and trace facility, which provides the Java™ virtual machine (JVM) logs, diagnostic
trace, and service log files. These files are commonly named SystemOut.log/SystemErr.log, trace.log and activity.log. HPEL provides a log data
repository, a trace data repository, and a text log file.
About this task
Instead of the existing logging facility, you can use HPEL,
which is disabled by default. In HPEL mode, the log and trace contents
are written to a log data or trace data repository in a proprietary
binary format. Therefore, enabling HPEL can improve server performance
by providing faster log and trace handling capabilities. Enable HPEL
with the server properties files for your container servers and catalog
servers. After you enable HPEL, all WebSphere eXtreme Scale logging and the resulting
log files are placed in the specified HPEL repository location.
Procedure
- Set properties to enable HPEL logging.
- Restart the servers on which you modified the server properties
file to set HPEL properties. After HPEL is enabled and the server
restarted, the previous WebSphere eXtreme Scale logging information is no longer available. The previous logging
information is replaced by equivalent HPEL information.
- Use the HPEL command-line log viewer to view your log files.
- From a command prompt, go to the bin directory.
C:\Program Files\IBM\WebSphere\eXtremeScale\ObjectGrid\bin
/opt/IBM/WebSphere/eXtremeScale/ObjectGrid/bin
- Run the following command to get help with the log viewer:
logViewer -help
./logViewer.sh -help
- Some common commands that you can use with the log viewer
follow:
- Run the following command to create a legacy format log file, legacyFormat.log, that contains only log records INFO,
WARNING, and SEVERE:
logViewer -outLog ..\logs\legacyFormat.log -minLevel INFO -maxLevel SEVERE
./logViewer.sh -outLog ../logs/legacyFormat.log -minLevel INFO -maxLevel SEVERE
Use a text editor to view the legacy format log file that you created.
- Run the following command to view only the log records for
thread 0:
logViewer -thread 0
./logViewer.sh -thread 0
- Run the following command to view only WARNING messages:
logViewer -level WARNING
./logViewer.sh -level WARNING
- Run the following command to retrieve all log records NOT
from loggers that begin with com.ibm:
logViewer -excludeLoggers com.ibm.*
./logViewer.sh -excludeLoggers com.ibm.*
- Run the following command to extract a repository of just
WARNING and SEVERE messages and save the resulting file in a new directory:
logViewer -minLevel WARNING -maxLevel SEVERE -extractToNewRepository ..\logs\newHPELRepository
./logViewer.sh -minLevel WARNING -maxLevel SEVERE -extractToNewRepository ../logs/newHPELRepository
- Run the following command to export the contents of the resulting
repository to a text format log file:
logViewer -repositoryDir ..\logs\newHPELRepository -outLog ..\logs\newFormat.log
./logViewer.sh -repositoryDir ../logs/newHPELRepository -outLog ../logs/newFormat.log
Use a text editor to view the resulting log file.