# ILogger

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-headless-vnc/remote_viewing/logging/trait-ilogger/

**trait** · [`ferroui-headless-vnc`](/docs/0.5.0/api/ferroui-headless-vnc/) · v0.5.0

```rust
trait ILogger: Send + Sync
```

Represents a type used to perform logging.

Loggers are shared with the threads of a server session, hence `Send`
and `Sync`.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Headless/FerroUI.Headless.Vnc/remote_viewing/logging.rs#L97)

## Members

- [`log`](#function-log)
- [`is_enabled`](#function-is_enabled)
- [`begin_scope`](#function-begin_scope)

<a id="function-log"></a>

### log

```rust
fn log(self: &Self, log_level: LogLevel, event_id: EventId, state: &dyn Any, exception: Option<&dyn Error>, formatter: LogFormatter<'_>)
```

Writes a log entry.

`state` is the entry to be written (the message, for the extension
methods of `LoggerExtensions`); `formatter` creates the message
of the entry from `state` and `exception`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Headless/FerroUI.Headless.Vnc/remote_viewing/logging.rs#L103)

<a id="function-is_enabled"></a>

### is_enabled

```rust
fn is_enabled(self: &Self, log_level: LogLevel) -> bool
```

Checks if the given `log_level` is enabled.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Headless/FerroUI.Headless.Vnc/remote_viewing/logging.rs#L113)

<a id="function-begin_scope"></a>

### begin_scope

```rust
fn begin_scope(self: &Self, state: &dyn Any) -> Rc<dyn IDisposable>
```

Begins a logical operation scope. Returns a disposable object that
ends the logical operation scope on dispose.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Headless/FerroUI.Headless.Vnc/remote_viewing/logging.rs#L117)

## Availability

Extracted for `x86_64-unknown-linux-gnu`, `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
