pub struct Logger {
pub config: Arc<BurnConfig>,
/* private fields */
}Expand description
Central logging utility for Burn, managing one sink registry shared across subsystems.
Fields§
§config: Arc<BurnConfig>The configuration snapshot the logger was initialized with.
Implementations§
Source§impl Logger
impl Logger
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new Logger from the current global BurnConfig.
Note that creating a logger is somewhat expensive because it opens file handles for any sink configured with a file path.
Sourcepub fn log_fusion<S: Display>(&mut self, msg: &S)
pub fn log_fusion<S: Display>(&mut self, msg: &S)
Writes msg to all configured fusion sinks.
Sourcepub fn log_autodiff<S: Display>(&mut self, msg: &S)
pub fn log_autodiff<S: Display>(&mut self, msg: &S)
Writes msg to all configured autodiff sinks.
Sourcepub fn log_level_fusion(&self) -> FusionLogLevel
pub fn log_level_fusion(&self) -> FusionLogLevel
Returns the current fusion log level.
Sourcepub fn log_level_autodiff(&self) -> AutodiffLogLevel
pub fn log_level_autodiff(&self) -> AutodiffLogLevel
Returns the current autodiff log level.
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 UnsafeUnpin for Logger
impl UnwindSafe for Logger
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