Skip to content

Commit

Permalink
enable RUST_LOG=<module_name>=<level> (madara-alliance#163)
Browse files Browse the repository at this point in the history
* update: enable RUST_LOG=<module_name>=<level>

* update: CI fix

* fix: bugs

* fix: bugs
  • Loading branch information
heemankv authored Oct 21, 2024
1 parent 82024c7 commit e7a51d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

## Fixed

- fixes logs based on RUST_LOG
- fixes after sepolia testing
- all failed jobs should move to failed state
- Fixes all unwraps() in code to improve error logging
Expand Down
4 changes: 3 additions & 1 deletion crates/orchestrator/src/telemetry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ use tracing::Level;
use tracing_opentelemetry::OpenTelemetryLayer;
use tracing_subscriber::layer::SubscriberExt as _;
use tracing_subscriber::util::SubscriberInitExt as _;
use tracing_subscriber::EnvFilter;
use utils::env_utils::{get_env_var_optional, get_env_var_or_default, get_env_var_or_panic};

lazy_static! {
Expand All @@ -29,7 +30,8 @@ pub fn setup_analytics() -> Option<SdkMeterProvider> {

let tracing_subscriber = tracing_subscriber::registry()
.with(tracing_subscriber::filter::LevelFilter::from_level(level))
.with(tracing_subscriber::fmt::layer().with_target(false));
.with(tracing_subscriber::fmt::layer())
.with(EnvFilter::from_default_env());

if let Some(otel_endpoint) = otel_endpoint {
let meter_provider = init_metric_provider(&otel_endpoint);
Expand Down

0 comments on commit e7a51d9

Please sign in to comment.