Skip to main content

Module log_db

Module log_db 

Source
Expand description

Tracing log export into the local SQLite log database.

This module provides a tracing_subscriber::Layer that captures events, formats each one into a LogEntry, and sends entries to a bounded background queue. The background task inserts into the dedicated logs SQLite database in batches to keep logging overhead low.

§Usage

use codex_state::log_db;
use tracing_subscriber::prelude::*;

let layer = log_db::start(state_db);
let _ = tracing_subscriber::registry()
    .with(layer)
    .try_init();

Structs§

LogDbLayer
LogSinkQueueConfig

Traits§

LogWriter
A tracing log writer that can flush entries accepted by its queue.

Functions§

default_filter
start