Log files and Debugging
Viewing log files
By default, nevisProxy writes its log files into the /var/opt/nevisproxy/<instance>/logs
directory.
The nevisproxy log
commands may be used to view the log files mentioned above. The 3 basic log files are:
apache.log
This file contains the Apache error and debug messages.
navajo.log
This log file contains all error and tracing information generated by the Navajo servlet container, servlets, and filters.
access.log
Transaction log containing a line for each HTTP request. Use the "LogFormat" parameter to specify the content/format for this log file.
Log level
The following table shows the mapping between the level set in the trace groups and the severity printed into the log file:
Level | Severity | Description |
---|---|---|
0 | EMERGENCY | Nothing works anymore. |
1 | ALERT | Something should be corrected immediately. |
2 | CRITICAL | A critical situation has occurred. |
3 | ERROR | Other error messages. |
5 | NOTICE | Things you should know. |
6 | INFO | Things of interest. |
7 | DEBUG_LOW | Low debug level. |
8 | DEBUG_MED | Medium debug level. |
9 | DEBUG_HIGH | High debug level (enter/leave). |
10 | DEBUG_MAX | Highest debug level. |
Debugging
For troubleshooting, you can get more detailed information by increasing the log levels. The following type of tracings are available:
- Apache tracing
- Servlet container tracing
- nevisProxy tracing
- Isiweb tracing
- SSL tracing
To adjust the tracing of the servlet container, you have to edit the bc.properties file.
Propagate client and transaction identifier
It is always useful to propagate the IP address of the client as well as the transaction id (also called trID or transferID), which identifies a HTTP request, to the application servers to be logged on those servers too. This allows correlation of events within the log files of all involved servers. The propagation of this information may be implemented by forwarding the necessary data within HTTP request headers. The "clientID" represents the user's session identifier allowing tracking all requests performed during a user's session. A DelegationFilter may be used to add the necessary request headers.
Example configuration:
<filter>
<filter-name>Forwarded-For</filter-name>
<filter-class>ch::nevis::isiweb4::filter::delegation::DelegationFilter</filter-class>
<init-param>
<param-name>Delegate</param-name>
<param-value>
ENV:REMOTE_ADDR:X-Forwarded-For
ENV:UNIQUE_ID:transferId
ENV:bcx.servlet.session.HttpSessionId:clientId
</param-value>
</init-param>
</filter>