pub enum LogLevel {
None,
Error,
Warn,
Info,
Debug,
}Expand description
Logging level for controlling plugin verbosity
This enum allows you to control how much logging output the plugin produces. Use it to reduce noise in production environments or enable detailed logs for debugging.
§Example
use serialplugin_core::state::LogLevel;
let log_level = LogLevel::Error; // Only show errorsVariants§
None
No logging output
Error
Only critical errors
Warn
Errors and warnings
Info
Errors, warnings, and general information
Debug
All logging including debug information
Implementations§
Source§impl LogLevel
impl LogLevel
Sourcepub fn should_log_error(&self) -> bool
pub fn should_log_error(&self) -> bool
Checks if error messages should be logged at the current level
Sourcepub fn should_log_warn(&self) -> bool
pub fn should_log_warn(&self) -> bool
Checks if warning messages should be logged at the current level
Sourcepub fn should_log_info(&self) -> bool
pub fn should_log_info(&self) -> bool
Checks if info messages should be logged at the current level
Sourcepub fn should_log_debug(&self) -> bool
pub fn should_log_debug(&self) -> bool
Checks if debug messages should be logged at the current level
Trait Implementations§
impl Copy for LogLevel
Source§impl<'de> Deserialize<'de> for LogLevel
impl<'de> Deserialize<'de> for LogLevel
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for LogLevel
impl StructuralPartialEq for LogLevel
Auto Trait Implementations§
impl Forget for LogLevel
impl Freeze for LogLevel
impl Move for LogLevel
impl RefUnwindSafe for LogLevel
impl Send for LogLevel
impl Sync for LogLevel
impl Unpin for LogLevel
impl UnsafeUnpin for LogLevel
impl UnwindSafe for LogLevel
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