pub struct Logger { /* private fields */ }
Implementations§
Source§impl Logger
impl Logger
pub fn new() -> Self
pub fn init( tag: String, spec: &str, log_target: &str, colored: bool, access_logs_target: Option<&str>, access_format: Option<AccessLogFormat>, access_colored: Option<bool>, ) -> Result<(), LogError>
pub fn set_directives(&mut self, directives: Vec<LogDirective>)
pub fn split(&mut self) -> (i32, &str, &mut InnerLogger)
Methods from Deref<Target = InnerLogger>§
pub fn log(&mut self, args: Arguments<'_>)
Sourcepub fn log_access(&mut self, log: RequestRecord<'_>) -> bool
pub fn log_access(&mut self, log: RequestRecord<'_>) -> bool
write an access log to the proper logging target
Protobuf access logs are written with a prost length delimiter before, and 2 empty bytes after
pub fn enabled(&self, meta: Metadata) -> bool
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Logger
impl RefUnwindSafe for Logger
impl Send for Logger
impl Sync for Logger
impl Unpin for Logger
impl UnwindSafe for Logger
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