refactor(adaptive-strategy): remove noisy hardcoded config eprintln warnings
Remove 8 warning prints (tracing::warn! and eprintln!) from Default impls in config.rs. These fired on every test run and default construction, creating noise. The migration notice in the module-level comment remains as documentation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -66,9 +66,6 @@ pub struct GeneralConfig {
|
||||
|
||||
impl Default for GeneralConfig {
|
||||
fn default() -> Self {
|
||||
tracing::warn!(
|
||||
"Using hardcoded GeneralConfig::default() - migrate to database configuration!"
|
||||
);
|
||||
Self {
|
||||
execution_interval: Duration::from_millis(100_u64),
|
||||
error_backoff_duration: Duration::from_secs(1_u64),
|
||||
@@ -80,9 +77,6 @@ impl Default for GeneralConfig {
|
||||
|
||||
impl Default for AdaptiveStrategyConfig {
|
||||
fn default() -> Self {
|
||||
tracing::warn!("Using hardcoded AdaptiveStrategyConfig::default() - migrate to database configuration!");
|
||||
tracing::warn!(" Load configuration from database using DatabaseConfigLoader instead.");
|
||||
tracing::warn!(" Available strategies: 'default-production', 'development', 'aggressive'");
|
||||
Self {
|
||||
general: GeneralConfig::default(),
|
||||
ensemble: EnsembleConfig::default(),
|
||||
@@ -112,9 +106,6 @@ pub struct EnsembleConfig {
|
||||
|
||||
impl Default for EnsembleConfig {
|
||||
fn default() -> Self {
|
||||
tracing::warn!(
|
||||
"Using hardcoded EnsembleConfig::default() - migrate to database configuration!"
|
||||
);
|
||||
Self {
|
||||
max_parallel_models: 4_usize,
|
||||
rebalancing_interval: Duration::from_secs(300_u64),
|
||||
@@ -162,9 +153,6 @@ pub struct ModelConfig {
|
||||
|
||||
impl Default for ModelConfig {
|
||||
fn default() -> Self {
|
||||
tracing::warn!(
|
||||
"Using hardcoded ModelConfig::default() - migrate to database configuration!"
|
||||
);
|
||||
Self {
|
||||
id: "default_model".to_owned(),
|
||||
name: "default_model".to_owned(),
|
||||
@@ -198,9 +186,6 @@ pub struct RiskConfig {
|
||||
|
||||
impl Default for RiskConfig {
|
||||
fn default() -> Self {
|
||||
tracing::warn!(
|
||||
"Using hardcoded RiskConfig::default() - migrate to database configuration!"
|
||||
);
|
||||
Self {
|
||||
max_position_size: 0.1_f64,
|
||||
max_leverage: 2.0_f64,
|
||||
@@ -252,9 +237,6 @@ pub struct MicrostructureConfig {
|
||||
|
||||
impl Default for MicrostructureConfig {
|
||||
fn default() -> Self {
|
||||
tracing::warn!(
|
||||
"Using hardcoded MicrostructureConfig::default() - migrate to database configuration!"
|
||||
);
|
||||
Self {
|
||||
book_depth: 10_usize,
|
||||
vpin_window: 50_usize,
|
||||
@@ -284,9 +266,6 @@ pub struct RegimeConfig {
|
||||
|
||||
impl Default for RegimeConfig {
|
||||
fn default() -> Self {
|
||||
eprintln!(
|
||||
"WARNING: Using hardcoded RegimeConfig::default() - migrate to database configuration!"
|
||||
);
|
||||
Self {
|
||||
detection_method: RegimeDetectionMethod::HMM,
|
||||
lookback_window: 252_usize,
|
||||
@@ -338,7 +317,6 @@ pub struct ExecutionConfig {
|
||||
|
||||
impl Default for ExecutionConfig {
|
||||
fn default() -> Self {
|
||||
eprintln!("WARNING: Using hardcoded ExecutionConfig::default() - migrate to database configuration!");
|
||||
Self {
|
||||
algorithm: ExecutionAlgorithm::TWAP,
|
||||
max_order_size: 10000.0_f64,
|
||||
|
||||
Reference in New Issue
Block a user