Skip to content

Commit

Permalink
chore(notify): sort logging macros and NotificationLevel on verbosity
Browse files Browse the repository at this point in the history
50216ad 'reorder'
  • Loading branch information
rami3l committed Jun 15, 2024
1 parent 2c4f986 commit 988f14a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions src/cli/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,24 @@ use opentelemetry_sdk::trace::Tracer;

use crate::{currentprocess::Process, utils::notify::NotificationLevel};

macro_rules! warn {
( $ ( $ arg : tt ) * ) => ( ::tracing::warn ! ( $ ( $ arg ) * ) )
macro_rules! debug {
( $ ( $ arg : tt ) * ) => ( ::tracing::trace ! ( $ ( $ arg ) * ) )
}

macro_rules! err {
( $ ( $ arg : tt ) * ) => ( ::tracing::error ! ( $ ( $ arg ) * ) )
macro_rules! verbose {
( $ ( $ arg : tt ) * ) => ( ::tracing::debug ! ( $ ( $ arg ) * ) )
}

macro_rules! info {
( $ ( $ arg : tt ) * ) => ( ::tracing::info ! ( $ ( $ arg ) * ) )
}

macro_rules! verbose {
( $ ( $ arg : tt ) * ) => ( ::tracing::debug ! ( $ ( $ arg ) * ) )
macro_rules! warn {
( $ ( $ arg : tt ) * ) => ( ::tracing::warn ! ( $ ( $ arg ) * ) )
}

macro_rules! debug {
( $ ( $ arg : tt ) * ) => ( ::tracing::trace ! ( $ ( $ arg ) * ) )
macro_rules! err {
( $ ( $ arg : tt ) * ) => ( ::tracing::error ! ( $ ( $ arg ) * ) )
}

pub fn tracing_subscriber(process: Process) -> impl tracing::Subscriber {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/notify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ use tracing::Level;

#[derive(Debug)]
pub(crate) enum NotificationLevel {
Debug,
Verbose,
Info,
Warn,
Error,
Debug,
}

impl fmt::Display for NotificationLevel {
Expand Down

0 comments on commit 988f14a

Please sign in to comment.