Skip to content
Merged
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: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,9 @@ bytes = "1"
crc_all = "0.2"
futures = "0.3"
hex = "0.4"
hyper = { version = "1", features = ["full"] }
inventory = "0.3"
modular-bitfield = "0.12"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
sha2 = "0.10"
strum = { version = "0.27", features = ["derive"] }
test-case = "3.3.1"
thiserror = "2.0"
Expand Down
5 changes: 1 addition & 4 deletions mujina-miner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,9 @@ bytes = { workspace = true }
crc_all = { workspace = true }
futures = { workspace = true }
hex = { workspace = true }
hyper = { workspace = true }
inventory = { workspace = true }
modular-bitfield = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
sha2 = { workspace = true }
strum = { workspace = true }
thiserror = { workspace = true }
time = { workspace = true }
Expand All @@ -37,7 +34,6 @@ utoipa = { workspace = true }
utoipa-axum = { workspace = true }
utoipa-swagger-ui = { workspace = true }
tracing = { workspace = true }
tracing-journald = { workspace = true }
tracing-subscriber = { workspace = true }
nix = { workspace = true }
parking_lot = { workspace = true }
Expand All @@ -50,6 +46,7 @@ ruint = "1.17.0"

[target.'cfg(target_os = "linux")'.dependencies]
tokio-udev = { workspace = true }
tracing-journald = { workspace = true }
udev = { workspace = true }

[[bin]]
Expand Down
9 changes: 6 additions & 3 deletions mujina-miner/src/tracing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
//! access to the `trace!()`, `debug!()`, `info!()`, `warn!()`, and `error!()`
//! macros.

use std::{env, fmt};
use std::fmt;
use time::OffsetDateTime;
use tracing::field::{Field, Visit};
use tracing::{Event, Level, Subscriber};
use tracing_journald;
use tracing_subscriber::{
filter::{EnvFilter, LevelFilter},
fmt::{
Expand All @@ -25,16 +24,20 @@ use tracing_subscriber::{
};

#[cfg(target_os = "linux")]
use std::{io, os::unix::io::AsRawFd};
use std::{env, io, os::unix::io::AsRawFd};

#[cfg(target_os = "linux")]
use nix::libc;

#[cfg(target_os = "linux")]
use tracing_journald;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens with this on macos?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the use tracing_journald; line is skipped

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

skot is right. Also updated Cargo.toml, moving tracing-journald into [target.'cfg(target_os = "linux")'.dependencies], so it won't be compiled on macOS at all rather than just skipped.


pub mod prelude {
#[allow(unused_imports)]
pub use tracing::{debug, error, info, trace, warn};
}

#[cfg(target_os = "linux")]
use prelude::*;

/// Check if stderr is connected to systemd journal by validating JOURNAL_STREAM.
Expand Down
9 changes: 2 additions & 7 deletions tools/mujina-dissect/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ mujina-miner = { path = "../../mujina-miner" }
# CLI and utilities
clap = { version = "4", features = ["derive"] }
anyhow = "1.0"
thiserror = "2.0"

# CSV parsing
csv = "1.3"
Expand All @@ -34,14 +33,10 @@ chrono = "0.4"
# Output formatting
colored = "2.0"

# Hex formatting
hex = "0.4"

# Protocol parsing
bytes = "1.7"
tokio-util = { version = "0.7", features = ["codec"] }
bitcoin = { workspace = true }

# Logging (optional)
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
# Logging
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
Loading