# LogCapture

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-inspect/struct-logcapture/

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

```rust
struct LogCapture
```

The process-wide capture. Entries are recorded only while a guard of `LogCapture::install` is
alive; the ring keeps the last 1024.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Inspect/logs.rs#L56)

## Members

- [`install`](#function-install)
- [`capture_from`](#function-capture_from)
- [`since`](#function-since)
- [`snapshot`](#function-snapshot)

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

### install

```rust
fn install() -> LogGuard
```

Installs the tee, or keeps the installed one for one more guard.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Inspect/logs.rs#L59)

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

### capture_from

```rust
fn capture_from(level: LogEventLevel)
```

Captures events from `level` up while the tee is installed (Information by default).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Inspect/logs.rs#L76)

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

### since

```rust
fn since(cursor: &mut u64) -> Vec<LogEntry>
```

The entries after `cursor`; `cursor` moves to the last recorded entry.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Inspect/logs.rs#L80)

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

### snapshot

```rust
fn snapshot(after: u64) -> Value
```

`{"cursor", "entries"}` of the entries after `after`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Inspect/logs.rs#L92)

## Trait implementations

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

## Availability

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