HTTP request logging
HTTP requests to the runtime engine are logged to the runtime-request.log file. HTTP requests to the admin console are logged to the admin-request.log file.
You can configure the output for these files using the appropriate appender for your desired output in the log4j2.xml file:
-
To write to the log files in standard format, update the
RollingFile name="RuntimeRequestLog"and"RollingFile name="AdminRequestLog"sections. -
To write to the log files in JSON format, update the
RollingFile name="RuntimeRequestLog-JSON"andRollingFile name="AdminRequestLog-JSON"sections. -
To write to the admin console in JSON format, uncomment the
ref="CONSOLE-RuntimeRequestLog-JSON"andref="CONSOLE-AdminRequestLog-JSON"appenders.
You can also configure the output format and ignorePath settings in the HTTP Server Request Log Settings section of the run.properties file. Learn more in Configuring PingFederate properties.
You can correlate request log events with the server log and audit log by using shared log attributes. Learn more in Correlating log events using attributes.
The HTTP request logs are written to the default PingFederate log directory.
Reverting to previous logging behavior
Prior to version 12.3, the PingFederate web container logged runtime engine HTTP requests to the <date>.request.log file, and admin console HTTP requests to the <date>.request2.log file.
The following procedure lets you revert to this legacy behavior to maintain logging continuity after you upgrade to PingFederate 12.3. However, you should consider this reversion a temporary measure while you update your log tracking. Future versions of PingFederate will log HTTP requests through the log4j.xml file.
Like other PingFederate-generated log files, the legacy HTTP request logs are written to the default PingFederate log directory. Properties controlling request legacy logging are contained in the web-container configuration files:
-
jetty-runtime.xmlfor the runtime engine (the<date>.request.logfiles) -
jetty-admin.xmlfor the administrative console (the<date>.request2.logfiles)
You can find these files in the <pf_install>/pingfederate/etc directory, and you can independently manage them on a per-server basis.
Steps
-
Open the
<pf_install>/pingfederate/bin/run.propertiesfile. -
Under the
HTTP Server Runtime Request Log Settingssection, make the following changes:-
Add
jetty.runtime.requestlog.useLog4j2Logger="false". -
Add the timestamp attribute to the formatting property. It should read
jetty.runtime.requestlog.format=%{client}a - %u %{dd/MMM/yyyy:HH:mm:ss ZZZ}t "%r" %s %O.
-
-
Under the
HTTP Server Admin Request Log Settingssection, make the following changes:-
Add
jetty.admin.requestlog.useLog4j2Logger="false". -
Add the timestamp attribute to the formatting property. It should read
jetty.admin.requestlog.format=%{client}a - %u %{dd/MMM/yyyy:HH:mm:ss ZZZ}t "%r" %s %O.
-
-
Save and close the file.
-
If you’re running PingFederate in a clustered environment, repeat these steps for each node.
|
When you’re ready to update to log4j2 logging, you can revert the changes made to the |