Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/commands/start/curio/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ EnablePDP = true
EnableParkPiece = true
"#;

/// PDP debug log level environment variable
pub const CURIO_PDP_DEBUG_LOG_LEVEL: &str = "GOLOG_LOG_LEVEL=pdp=debug";

/// Wait times (in seconds)
pub const DB_SETUP_WAIT_SECS: u64 = 10;
pub const STORAGE_ATTACH_WAIT_SECS: u64 = 5;
Expand Down
4 changes: 2 additions & 2 deletions src/commands/start/curio/daemon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use super::super::step::SetupContext;
use super::db_setup::{build_db_env_vars, build_foc_contract_env_vars, build_lotus_env_vars};
use super::CurioStep;
use crate::commands::start::curio::constants::CURIO_LAYERS;
use crate::commands::start::curio::constants::{CURIO_LAYERS, CURIO_PDP_DEBUG_LOG_LEVEL};
use crate::docker::command_logger::run_and_log_command_strings;
use crate::docker::init::set_volume_ownership;
use crate::docker::network::{lotus_network_name, pdp_miner_network_name};
Expand Down Expand Up @@ -249,7 +249,7 @@ fn build_docker_create_args(
}

docker_args.push("-e".to_string());
docker_args.push("GOLOG_LOG_LEVEL=pdp=debug".to_string());
docker_args.push(CURIO_PDP_DEBUG_LOG_LEVEL.to_string());

Ok(docker_args)
}
6 changes: 3 additions & 3 deletions src/commands/start/curio/db_setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//! - PDP layer configuration (curio config create)

use super::super::step::SetupContext;
use super::constants::{DB_SETUP_WAIT_SECS, PDP_LAYER_CONFIG_TEMPLATE};
use super::constants::{CURIO_PDP_DEBUG_LOG_LEVEL, DB_SETUP_WAIT_SECS, PDP_LAYER_CONFIG_TEMPLATE};
use crate::commands::start::foc_deploy::contract_addresses::ContractAddresses;
use crate::commands::start::genesis::constants::PDP_SP_MINER_ID_START;
use crate::commands::start::lotus_utils::{build_fullnode_api_info, read_lotus_token};
Expand Down Expand Up @@ -202,7 +202,7 @@ fn create_base_cluster(
}

docker_args.push("-e");
docker_args.push("GOLOG_LOG_LEVEL=pdp=debug");
docker_args.push(CURIO_PDP_DEBUG_LOG_LEVEL);

// Add image and command
let bash_cmd = format!(
Expand Down Expand Up @@ -315,7 +315,7 @@ fn create_pdp_layer(context: &SetupContext, sp_index: usize) -> Result<(), Box<d
}

docker_args.push("-e");
docker_args.push("GOLOG_LOG_LEVEL=pdp=debug");
docker_args.push(CURIO_PDP_DEBUG_LOG_LEVEL);

// Add image and command with heredoc for config
let bash_cmd = format!(
Expand Down