diff --git a/taptrade-cli-demo/coordinator/src/main.rs b/taptrade-cli-demo/coordinator/src/main.rs index 507da4c..8554690 100755 --- a/taptrade-cli-demo/coordinator/src/main.rs +++ b/taptrade-cli-demo/coordinator/src/main.rs @@ -69,23 +69,13 @@ use tokio::{ use validator::{Validate, ValidationError}; use wallet::{wallet_utils::*, *}; +static LOGGING_ENABLED: AtomicBool = AtomicBool::new(true); + pub struct Coordinator { pub coordinator_db: Arc, pub coordinator_wallet: Arc>, } -static LOGGING_ENABLED: AtomicBool = AtomicBool::new(true); - -fn get_logging_color_code(level: log::Level) -> &'static str { - match level { - log::Level::Error => "\x1B[31m", // Red - log::Level::Warn => "\x1B[33m", // Yellow - log::Level::Info => "\x1B[32m", // Green - log::Level::Debug => "\x1B[34m", // Blue - log::Level::Trace => "\x1B[36m", // Cyan - } -} - // populate .env with values before starting #[tokio::main] async fn main() -> Result<()> { @@ -139,3 +129,13 @@ async fn main() -> Result<()> { api_server(coordinator).await?; Ok(()) } + +fn get_logging_color_code(level: log::Level) -> &'static str { + match level { + log::Level::Error => "\x1B[31m", // Red + log::Level::Warn => "\x1B[33m", // Yellow + log::Level::Info => "\x1B[32m", // Green + log::Level::Debug => "\x1B[34m", // Blue + log::Level::Trace => "\x1B[36m", // Cyan + } +}