Skip to content
Closed
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
9 changes: 5 additions & 4 deletions mujina-miner/src/tracing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@
//! access to the `trace!()`, `debug!()`, `info!()`, `warn!()`, and `error!()`
//! macros.

use std::{env, fmt};
use std::fmt;
#[cfg(target_os = "linux")]
use std::env;
use time::OffsetDateTime;
use tracing::field::{Field, Visit};
use tracing::{Event, Level, Subscriber};
#[cfg(target_os = "linux")]
use tracing_journald;
use tracing_subscriber::{
filter::{EnvFilter, LevelFilter},
Expand All @@ -35,8 +38,6 @@ pub mod prelude {
pub use tracing::{debug, error, info, trace, warn};
}

use prelude::*;

/// Check if stderr is connected to systemd journal by validating JOURNAL_STREAM.
///
/// Per systemd documentation, programs should parse the device and inode numbers
Expand Down Expand Up @@ -91,7 +92,7 @@ pub fn init_journald_or_stdout() {
tracing_subscriber::registry().with(layer).init();
return;
} else {
error!("Failed to initialize journald logging, using stdout.");
tracing::error!("Failed to initialize journald logging, using stdout.");
}
}
}
Expand Down