pub struct LogWriter { /* private fields */ }Expand description
Shared writer — holds open file handles for all active (node, logging-config) pairs
Implementations§
Source§impl LogWriter
impl LogWriter
Sourcepub fn write_traces(
&self,
node_id: &NodeId,
params: &LoggingParams,
traces: &[TraceObject],
) -> Result<()>
pub fn write_traces( &self, node_id: &NodeId, params: &LoggingParams, traces: &[TraceObject], ) -> Result<()>
Write a batch of traces for one (node, logging-params) pair
Sourcepub fn rotate_if_needed(
&self,
node_id: &NodeId,
params: &LoggingParams,
limit_bytes: u64,
) -> Result<()>
pub fn rotate_if_needed( &self, node_id: &NodeId, params: &LoggingParams, limit_bytes: u64, ) -> Result<()>
Rotate the log file for a key if it exceeds limit_bytes
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for LogWriter
impl RefUnwindSafe for LogWriter
impl Send for LogWriter
impl Sync for LogWriter
impl Unpin for LogWriter
impl UnsafeUnpin for LogWriter
impl UnwindSafe for LogWriter
Blanket Implementations§
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more