WAS v8.5 > Troubleshoot > Troubleshoot applications with HPEL

HPEL

HPEL is an alternative to the basic log and trace facility. HPEL provides...

Log files...


HPEL log and trace storage

HPEL log data repository Includes info written to System.out, System.err, or java.util.logging at level Detail or higher, including...

  • Detail
  • Config
  • Info
  • Audit
  • Warning
  • Severe
  • Fatal
HPEL trace data repository Includes info written to java.util.logging at levels below level Detail, including...

  • Fine
  • Finer
  • Finest
HPEL text log Text-based log content that can be read without having to run LogViewer, Does not contain any content not also stored in either the log data repository or trace data repository. Writing trace to the text log is expensive from a performance perspective. Disable to enhance server performance.


Log and trace performance

HPEL significantly outperforms the existing basic log and trace facility. Application servers can run with trace enabled while causing less impact to performance than tracing the same components using basic logging. Applications that frequently write to the logs might run faster with HPEL.

Log and trace events are each stored in only one place Log events, System.out, and System.err are stored in the log data repository. Trace events are stored in the trace data repository. Log events, and optionally trace events, are written to the text log file when it is enabled. Since this data is always also stored in the log data and trace data repositories, the text log file content is redundant. We can disable the text log.
Log and trace repositories are not shared across processes With HPEL, each server process has its own log data repository, trace data repository, and text log file. Since these files are not shared across processes, the server runtime environment does not need to synchronize with other processes when writing to these destinations, improving performance.
Data is not formatted unless it is needed Improves performance by deferring formatting until the LogViewer is run. Sections of the log or trace never viewed are never formatted.
Log and trace data is buffered before being written to disk Writing large blocks of data to a disk is more efficient than writing the same amount of data in small blocks. HPEL provides buffer log and trace data before writing it to disk. By default, log and trace data is stored in an 8 KB buffer before being written to disk. If the buffer is filled within 10 seconds, the buffer is written to disk. If the buffer is not filled within that time it is automatically written to disk to ensure the logs have the most current information.

The size of the buffer can be controlled by setting...

    HPEL.BUFFER.SIZE

The frequency the buffer writes to disk can be controlled by setting...

    HPEL.FLUSH.PERIOD.SECS


Administration of log and trace

The log data and trace data repositories are stored in a WAS proprietary format and cannot be read using text file editors such as Notepad or VI. Use LogViewer to copy data to a plain text format.

LogViewer provides filtering and formatting. For example, filter all log and trace entries that occurred within 10 seconds of a key error message on the same thread. Filter records based on the content of log and trace record extensions. The application server automatically creates appName and requestID extensions for each log and trace record related to a Java EE application. requestID extension is added only to log and trace records when Cross-Component Trace is enabled. Developers can add custom extensions using...

To configure HPEL, from the dmgr console...


Development

JMX MBean Description
HPELControlService Configure the log or trace detail level of the server.
View the log component registry.
Query the log and trace repositories.
HPELLogDataService Configure the log data repository of the server
HPELTraceDataService Configure the trace data repository of the server
HPELTextLogService Configure the text log file of the server
RasLoggingService JMX Notification of log events

When using HPEL for log and trace rather than basic logging, the log and trace JMX MBean, TraceService, is not used.

To access HPEL programatically...

Add custom extensions to log and trace records through a log record context...

When HPEL stores log and trace records, it includes any extensions present in the log record context on the same thread. For example, a servlet filter adds HTTP request parameters to the log record context. While that servlet runs, HPEL adds those extensions to any log and trace records created on the same thread.

Developers can access record extensions using the HPEL API. Useful when writing tools to read from log and trace repositories. Developers can make use of the log record context API to access extensions in custom log handlers, filters, and formatters at run time.


Related

Basic mode and HPEL mode
Change from basic mode to HPEL logging and tracing
Use Cross Component Trace
Configure HPEL
API documentation
LogViewer command-line tool


+

Search Tips   |   Advanced Search