pub struct AccessLog { /* private fields */ }Expand description
Buffered emitter. Per-handler call sites push entries via
AccessLog::record; a background task drains the buffer and writes
one S3 object per flush window.
Implementations§
Source§impl AccessLog
impl AccessLog
pub fn new(dest: AccessLogDest) -> Self
pub async fn record(&self, entry: AccessLogEntry)
Sourcepub fn spawn_flusher(&self) -> JoinHandle<()>
pub fn spawn_flusher(&self) -> JoinHandle<()>
Spawn the background flusher. Drains the buffer every
flush_every_secs (default 60) and appends to the per-hour file
in dest.dir. Returns the tokio JoinHandle so the caller can
abort on shutdown if needed.
Auto Trait Implementations§
impl Freeze for AccessLog
impl !RefUnwindSafe for AccessLog
impl Send for AccessLog
impl Sync for AccessLog
impl Unpin for AccessLog
impl UnsafeUnpin for AccessLog
impl !UnwindSafe for AccessLog
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more