cw-orch-daemon 0.19.0

Scripting library for deploying and interacting with CosmWasm smart-contracts
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use cw_orch_core::CwOrchEnvVars;

use crate::DaemonError;

// Prints a warning if log is disabled for the application
pub fn print_if_log_disabled() -> Result<(), DaemonError> {
    // Here we check for logging capabilities.
    if !log::log_enabled!(log::Level::Info) && !CwOrchEnvVars::load()?.disable_logs_message {
        println!(
            "Warning: It seems like you haven't enabled logs. In order to do so, you have to : 
            - use `env_logger::init()` at the start of your script.
            - Set the env variable `RUST_LOG=info` for standard logs. See https://docs.rs/env_logger/latest/env_logger/"
        )
    }
    Ok(())
}