pub struct GlobalLogger { /* private fields */ }Expand description
Global static structure to hold the logger
Implementations§
Source§impl GlobalLogger
impl GlobalLogger
Sourcepub fn reopen(&self) -> Result<()>
pub fn reopen(&self) -> Result<()>
Reopen file. This is a signal handler, also can be called manually.
Sourcepub fn tracing_layer<F: TracingFormatter>(
&'static self,
) -> Result<CaptainsLogLayer<F>>
Available on crate feature tracing only.
pub fn tracing_layer<F: TracingFormatter>( &'static self, ) -> Result<CaptainsLogLayer<F>>
tracing only.Initialize a layer for tracing. Use this when you stacking multiple tracing layers.
For usage, checkout the doc in crate::tracing_bridge
§NOTE:
In order to prevent duplicate output, it will fail if out tracing global subscriber has been initialized.
Sourcepub fn tracing_dispatch<F: TracingFormatter>(&'static self) -> Result<Dispatch>
Available on crate feature tracing only.
pub fn tracing_dispatch<F: TracingFormatter>(&'static self) -> Result<Dispatch>
tracing only.Initialize a tracing Dispatch, you can set_global_default() or use in a scope.
For usage, checkout the doc in crate::tracing_bridge
§NOTE:
In order to prevent duplicate output, it will fail if out tracing global subscriber has been initialized.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for GlobalLogger
impl !RefUnwindSafe for GlobalLogger
impl Send for GlobalLogger
impl Sync for GlobalLogger
impl Unpin for GlobalLogger
impl !UnwindSafe for GlobalLogger
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