mirror of
https://github.com/RoboSats/taptrade-core.git
synced 2025-07-28 13:43:24 +00:00
small changes
This commit is contained in:
@ -69,23 +69,13 @@ use tokio::{
|
|||||||
use validator::{Validate, ValidationError};
|
use validator::{Validate, ValidationError};
|
||||||
use wallet::{wallet_utils::*, *};
|
use wallet::{wallet_utils::*, *};
|
||||||
|
|
||||||
|
static LOGGING_ENABLED: AtomicBool = AtomicBool::new(true);
|
||||||
|
|
||||||
pub struct Coordinator {
|
pub struct Coordinator {
|
||||||
pub coordinator_db: Arc<CoordinatorDB>,
|
pub coordinator_db: Arc<CoordinatorDB>,
|
||||||
pub coordinator_wallet: Arc<CoordinatorWallet<MemoryDatabase>>,
|
pub coordinator_wallet: Arc<CoordinatorWallet<MemoryDatabase>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
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
|
// populate .env with values before starting
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() -> Result<()> {
|
async fn main() -> Result<()> {
|
||||||
@ -139,3 +129,13 @@ async fn main() -> Result<()> {
|
|||||||
api_server(coordinator).await?;
|
api_server(coordinator).await?;
|
||||||
Ok(())
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user