mirror of
https://gitlab.com/gabmus/envision.git
synced 2025-04-20 11:35:48 +00:00
feat: add trace debug level
This commit is contained in:
parent
453ad231c8
commit
492aeddc2e
1 changed files with 3 additions and 1 deletions
|
@ -5,6 +5,7 @@ use relm4_icons::icon_name;
|
|||
|
||||
#[derive(Debug)]
|
||||
pub enum DebugLevel {
|
||||
Trace,
|
||||
Debug,
|
||||
Info,
|
||||
Warning,
|
||||
|
@ -14,6 +15,7 @@ pub enum DebugLevel {
|
|||
impl DebugLevel {
|
||||
pub fn from_string(s: String) -> Self {
|
||||
match s.to_lowercase().as_str() {
|
||||
"trace" => Self::Trace,
|
||||
"debug" => Self::Debug,
|
||||
"info" => Self::Info,
|
||||
"warning" => Self::Warning,
|
||||
|
@ -23,7 +25,7 @@ impl DebugLevel {
|
|||
}
|
||||
}
|
||||
|
||||
pub const DEBUG_LEVEL_STRINGS: [&str; 4] = ["Debug", "Info", "Warning", "Error"];
|
||||
pub const DEBUG_LEVEL_STRINGS: [&str; 5] = ["Trace", "Debug", "Info", "Warning", "Error"];
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum DebugViewMsg {
|
||||
|
|
Loading…
Add table
Reference in a new issue