# ParametrizedLogger

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/logging/struct-parametrizedlogger/

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

```rust
struct ParametrizedLogger
```

Logger sink parametrized for given logging level.

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

## Members

- [`new`](#function-new)
- [`is_valid`](#function-is_valid)
- [`log`](#function-log)
- [`log_with_values`](#function-log_with_values)

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

### new

```rust
fn new(sink: Rc<dyn ILogSink>, level: LogEventLevel, area: &'static str) -> Self
```

Creates a logger that writes to `sink` with the given level and area.

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

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

### is_valid

```rust
fn is_valid(self: &Self) -> bool
```

Checks if this logger can be used.

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

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

### log

```rust
fn log(self: &Self, 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/parametrized_logger.rs#L52)

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

### log_with_values

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

Logs an event with message property values, given in the order of
the `{Placeholders}` of the template.

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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- `ErasedDestructor`
- `IntoEither`
- `Clone`

## Availability

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