diff --git a/docs/cdp/cdp_activation/cdp_data_export.md b/docs/cdp/cdp_activation/cdp_data_export.md index cbc932559d..8941a83e86 100644 --- a/docs/cdp/cdp_activation/cdp_data_export.md +++ b/docs/cdp/cdp_activation/cdp_data_export.md @@ -133,3 +133,33 @@ Finally, you can specify the audiences you wish to include. !!! note "CDP requests" All CDP requests are logged in with `debug` severity. + +### CDP Monolog channel + +CDP Monolog channel handles webhook logs for easier separation of logs. + +```bash +- { name: monolog.logger, channel: ibexa.cdp.webhook } +``` + +It's possible to configure `ibexa.cdp.webhook` Monolog channel to direct all logs to specific stream, file, or service. +This allows webhook logs to be stored separately from the main application logs for easier debugging and analysis. + +To do it, in `config/packages/monolog.yaml` file, define a new handler for the `ibexa.cdp.webhook` channel that directs CPD Webhook events to a separate file. +It can be configured in both `dev` and `prod` environments, for example: + +```yaml +monolog: + handlers: + cdp_webhook: + type: stream + path: "%kernel.logs_dir%/cdp_webhook_%kernel.environment%.log" + level: debug + channels: [ 'ibexa.cdp.webhook' ] +``` + +If you want to avoid redundant or duplicate entries in the other logs, exclude the webhook channel by: + +```yaml +channels: ["!ibexa.cdp.webhook"] +```