# ILogSink

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/logging/trait-ilogsink/

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

```rust
trait ILogSink
```

Defines a sink for log events.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/logging/i_log_sink.rs#L7)

## Members

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

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

### is_enabled

```rust
fn is_enabled(self: &Self, level: LogEventLevel, area: &str) -> bool
```

Checks if given log level and area is enabled.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/logging/i_log_sink.rs#L9)

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

### log

```rust
fn log(self: &Self, level: LogEventLevel, area: &str, source: Option<&dyn Any>, message_template: &str)
```

Logs an event.

`source` is the object from which the event originates.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/logging/i_log_sink.rs#L14)

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

### log_with_values

```rust
fn log_with_values(self: &Self, level: LogEventLevel, area: &str, source: Option<&dyn Any>, message_template: &str, property_values: &[&dyn Display])
```

Logs a new event.

`property_values` are the message property values, in the order of
the `{Placeholders}` of the template.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/logging/i_log_sink.rs#L20)

## Trait implementations

- [`ILogSink`](/docs/0.5.0/api/ferroui-base/logging/trait-ilogsink/)

## Availability

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