Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
REVIEW: Guard the variant with appropriate feature flag
Lorenz Leutgeb committed 7 months ago
commit 6b14d7e209d6eb8e3384ce4d1d07382605b25500
parent 478b77b0a92a64be6e5844dfbc93155bcb3cd520
1 file changed +2 -0
modified crates/radicle-node/src/main.rs
@@ -29,6 +29,7 @@ const LOG_LEVEL_DEFAULT: &log::Level = &log::Level::Warn;
enum LogFormat {
    #[default]
    Radicle,
+
    #[cfg(feature = "structured-logger")]
    Json,
}

@@ -37,6 +38,7 @@ impl FromStr for LogFormat {

    fn from_str(s: &str) -> Result<Self, Self::Err> {
        match s {
+
            #[cfg(feature = "structured-logger")]
            "json" => Ok(LogFormat::Json),
            "radicle" => Ok(LogFormat::Radicle),
            _ => Err(format!("Invalid log format: {s}")),