From f7a1053f3c275f8bde6e87dff13161e10ca17e49 Mon Sep 17 00:00:00 2001 From: fbock Date: Fri, 23 Aug 2024 12:33:02 +0200 Subject: [PATCH] small changes --- taptrade-cli-demo/coordinator/src/main.rs | 24 +++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) 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 + } +}