# Transforming events

**Prerequisites**:

* Install [abstractions module](https://vostok.gitbook.io/logging/modules/abstractions)
* Read about general log [configuration practices](https://vostok.gitbook.io/logging/configuration)
* Read about [log interface](https://vostok.gitbook.io/logging/concepts/log-interface)
* Read about [log events](https://vostok.gitbook.io/logging/concepts/log-events)

Transforming extensions allows a particular `ILog` instance to modify some of incoming log events.

### Transform log level

Transform log levels of incoming log events according to provided mapping:

```csharp
log = log.WithLevelsTransformation(
    new Dictionary<LogLevel, LogLevel>
    {
        [LogLevel.Error] = LogLevel.Warn,
        [LogLevel.Fatal] = LogLevel.Warn
    });
```

Transform error log level of incoming log events to warning level:

```csharp
log = log.WithErrorsTransformedToWarns();
```
