Log
Use the Log policy to customize or override the default activity logging configuration for an API.
Gateway support
Gateway | Policy version |
---|---|
DataPower® API Gateway, policy available from V2018.4.1.7 | 2.0.0 |
This topic describes how to configure the policy in the assembly user interface; for details on how to configure the policy in your OpenAPI source, see log.
About
By default, the logging of activity when an API is called, and the sending of the log data to the analytics server, is determined by the settings in the API definition, as described in Activity logging with the DataPower API Gateway. However, you can customize activity logging by adding a Log policy to the API assembly flow.
- Gather activity log data, use a Redaction policy to redact sensitive fields in the data, then send to the analytics server.
- Send different levels of analytics data depending on certain conditions; for example, the API operation that was called.
- Configure custom activity logging in a global policy that is applied to every API in a Catalog. For more information on global policies, see Working with global policies.
Properties
The following table lists the policy properties, indicates whether a property is required, specifies the valid and default values for input, and specifies the data type of the values.
Property label | Required | Description | Data type |
---|---|---|---|
Title | No | The title of the policy. The default value is |
string |
Description | No | A description of the policy. | string |
Mode | Yes | Select one of the following options:
If you use the Send-only or Gather-and-send option, data is buffered and sent to the analytics server in batches according to the time interval configured for the Analytics Endpoint on the DataPower API Gateway. For more information, see Configuring an analytics endpoint in the DataPower knowledge center. Note: If you are offloading to a third party analytics server, you can redact any aspect
of the event data. If you are using API Connect analytics, you can redact only request and response
payloads.
|
string |