pub struct OSLog { /* private fields */ }Expand description
Safe wrapper around OSLog / os_log_t handles.
Implementations§
Source§impl OSLog
impl OSLog
Sourcepub fn new(subsystem: &str, category: &str) -> Result<Self, LogError>
pub fn new(subsystem: &str, category: &str) -> Result<Self, LogError>
Creates a log handle for a subsystem/category pair.
§Errors
Returns an error if either string contains a NUL byte or the bridge fails.
Sourcepub fn is_enabled(&self, level: Level) -> bool
pub fn is_enabled(&self, level: Level) -> bool
Returns whether a log level is enabled.
Sourcepub fn signposts_enabled(&self) -> bool
pub fn signposts_enabled(&self) -> bool
Returns whether signposts are enabled for this log handle.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OSLog
impl RefUnwindSafe for OSLog
impl !Send for OSLog
impl !Sync for OSLog
impl Unpin for OSLog
impl UnsafeUnpin for OSLog
impl UnwindSafe for OSLog
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