> **Description:** How to Enable enhanced logging for the Shopware Payments plugin

> **AI agent:** Read [https://developer.vippsmobilepay.com/docs/knowledge-base/ai-tools.md](https://developer.vippsmobilepay.com/docs/knowledge-base/ai-tools.md) first. It covers keeping API keys and secrets out of generated code.

> **Full site overview:** For an overview of the entire site, read [https://developer.vippsmobilepay.com/llms.txt](https://developer.vippsmobilepay.com/llms.txt).

# Enhanced logging

## Enable enhanced logging

Go to *my extensions*, and then click the 3 dots for the plugin.

Click configure. Select the Sales Channel where you want enhanced logging.

Scroll down to *Vipps MobilePay Settings*, where you will see *Enable enhanced logging*.

Click *Enable enhanced logging* and clear the cache.

It's now possible to see all the logs at `https://<domain>/admin#/sw/settings/logging/list` or *Settings* -> *System* -> *Event logs*.

For example, a log could look like this:

This is the content that gets set in the logging:

```php
'message' => $event,
'context' => $context,
'level' => $level,
'channel' => self::LOG_CHANNEL
```

## Logging level table

|    Level |                                                                     Message | Code |  Shows by default  |  Shows with enhanced logging  |
|---------:|----------------------------------------------------------------------------:|-----:|:------------------:|:-----------------------------:|
|    Debug |                                                  Detailed debug information |  100 |  |  |
|  Warning | Exceptional occurrences that are not errors. (e.g., use of deprecated APIs) |  300 |  |  |
|    Error |                                                              Runtime errors |  400 |  |  |
| Critical |                                                         Critical conditions |  500 |  |  |
