Working with Log Sinks and Debug Logs
This topic describes the procedures for common scenarios involving log sinks and debug logs.
gateway83
This topic describes the procedures for common scenarios involving log sinks and debug logs.
2
IMPORTANT:
Avoid creating too many log sinks, as this affects Gateway performance. CA Technologies recommends no more than three log sinks for best performance. Andy detailed filtering should be handled by external systems.Creating Log Sink for Custom Logger
To create a log sink for all messages from a custom logger:
- Configure an Add Audit Detail Assertion with the"<customLoggerName>"in theCustom logger namefield.
- Make note of theCategory(eitherAuditorLog).
- Make note of any custom logger name that is defined (for example, "com.l7tech.log.custom.<customLoggerName>").
- Run the Manage Log/Audit Sinks task and create a new log sink.
- Complete the properties for the log sink. Mandatory:
- In theBase Settingstab, define at least one filter:Filter Type:CategoryFilter Details:Select the category that matches theCategoryfrom the Add Audit Detail Assertion. EitherAuditsor one of the logs (Gateway Log,Traffic Log).
- Optionally, define a filter of typePackagefor your custom loggercom.l7tech.log.custom.<customLoggerName>.
During policy execution, audit details are sent only to the sink for the specified custom logger.
Creating Log Sink for Service(s)
To create a log sink for all messages from a service:
- Use the Manage Log/Audit Sinks task to create a new log sink that filters by one or more services.
During policy execution, only messages related to the selected services are sent to the log sink.
Debugging a Client IP
To create a log sink for all messages from a client IP:
- Use the Manage Log/Audit Sinks task to create a new log sink that filters by a specific client IP address.
- In the Log Sink Properties, set the severity threshold to FINE.
- Set the severity level for the appropriate package to FINE in thelog.levelscluster property for the appropriate loggers—for example, "<packageName>.level=FINE". Please contact CA Support for assistance with the package names.
During policy execution, only messages related to the specified client IP address are sent to the log sink.
Debugging SSL/TLS
To enable SSL/TLS debug for an HTTPS listen port:
- Set theio.debugSslcluster property to "true" to enable SSL/TLS debugging globally.
- Set thelog.stdoutLevelcluster property to FINE.
- Update thelog.levelscluster property to include the line STDOUT.level=FINE.
- Use the Manage Log/Audit Sinks task to create a new log sink with these properties:
- Severity Threshold:FINE
- Filters:
- Filter Type =Category, Filter Details =Gateway Log
- Filter Type =Package, Filter Details =STDOUT
- Restart the Gateway.
- Verify debug is working by consuming a service using an HTTPS Listen Port.
During policy execution, the SSL/TLS output related to the consumption is sent only to the configured log sink. (This assumes that no other log sinks are currently configured to allow "FINE" messages.)
If debug trace logging has been enabled for HTTP(S), be aware that this can log passwords, including passwords used to log in to the Policy Manager. Use this capability with caution. For assistance on enabling debug trace logging in HTTP(S), please contact CA Support.