Capturing Log Messages for Routes
To capture the context or entity of inbound and outbound messages for the route, or for the individual handlers and filters in the route, configure a CaptureDecorator. Captured information is written to SLF4J logs.
During debugging, consider using a CaptureDecorator to capture the entity and context of requests and responses. However, increased logging consumes resources, such as disk space, and can cause performance issues. In production, reduce logging by disabling the CaptureDecorator properties
captureContext, or setting
For more information about the decorator configuration, see "CaptureDecorator".
Studio provides an easy way to capture messages while developing your configuration. The following image illustrates the capture points where you can log messages on a route:
In Studio, select ROUTES, and then select a route with the icon.
On the left side of the screen, select Capture, and then select capture options. You can capture the body and context of messages passing to and from the user agent, the protected application, and the ForgeRock Identity Platform.
Select Deploy to push the route to the IG configuration.
You can check the
$HOME/.openig/config/routesfolder to see that the route is there.
Access the route, and then check
$HOME/.openig/logsfor a log file named by the route, where
$HOME/.openigis the instance directory. The log file should contain the messages defined by your capture configuration.