Struct sozu_command_lib::logging::Logger
source · pub struct Logger {
pub directives: Vec<LogDirective>,
pub backend: LoggerBackend,
pub access_backend: Option<LoggerBackend>,
pub tag: String,
pub pid: i32,
pub initialized: bool,
}
Fields§
§directives: Vec<LogDirective>
§backend: LoggerBackend
§access_backend: Option<LoggerBackend>
§tag: String
is displayed in each log, for instance “MAIN” or worker_id
pid: i32
the pid of the current process (main or worker)
initialized: bool
Implementations§
source§impl Logger
impl Logger
pub fn new() -> Self
pub fn init( tag: String, spec: &str, backend: LoggerBackend, access_backend: Option<LoggerBackend> )
pub fn log(&mut self, meta: &Metadata, args: Arguments<'_>)
pub fn log_access(&mut self, meta: &Metadata, args: Arguments<'_>)
pub fn compat_log(&mut self, meta: &Metadata<'_>, args: Arguments<'_>)
pub fn set_directives(&mut self, directives: Vec<LogDirective>)
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Logger
impl Send for Logger
impl Sync for Logger
impl Unpin for Logger
impl UnwindSafe for Logger
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§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