pub struct LogSubscription { /* private fields */ }Expand description
Owns a single filtered log subscription. Dropping it stops accepting records, wakes an idle callback thread without waiting for an already-running callback. Pending records are discarded when the worker exits; a blocked callback can retain its queue until it returns. This handle may be shared or moved across threads.
Callbacks run sequentially on a dedicated thread. They may query the SDK, replace/unsubscribe listeners or panic without blocking network workers. Logs synchronously produced on the callback thread are suppressed to prevent loops. Work explicitly spawned by a callback must avoid creating its own log loop.
Implementations§
Source§impl LogSubscription
impl LogSubscription
Sourcepub fn dropped_count(&self) -> u64
pub fn dropped_count(&self) -> u64
Total records discarded because this subscription’s queue was full.
Sourcepub fn drop_stats(&self) -> LogDropStats
pub fn drop_stats(&self) -> LogDropStats
Reads cumulative drops. dropped_count() remains equal to queue_full;
it does not include byte-budget or single-record-size rejections.