Skip to content

Commit 99331e2

Browse files
authored
fix: rename std log target to stderr (ThinkParQ/beegfs-rs#181)
And clarify what they mean in the config template. Keep std setting around hidden as an alias for stderr.
1 parent 18a5be7 commit 99331e2

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

mgmtd/assets/beegfs-mgmtd.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
# Managements database file location.
1212
# db-file = "/var/lib/beegfs/mgmtd.sqlite"
1313

14-
# The log target to use (valid are "journald", "std").
14+
# The log target to use. Valid options are:
15+
# "journald": Log to the systemd journal
16+
# "stderr": Log to the standard error output
1517
# log-target = "journald"
1618

1719
# The log level to use (valid are "error", "warn", "info", "debug", "trace").

mgmtd/src/config.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,8 +511,10 @@ const fn version_str() -> &'static str {
511511
#[derive(Clone, Debug, ValueEnum, Deserialize)]
512512
#[serde(rename_all = "kebab-case")]
513513
pub enum LogTarget {
514-
Std,
515514
Journald,
515+
#[value(alias("std"))]
516+
#[serde(alias = "std")]
517+
Stderr,
516518
}
517519

518520
/// Defines the log level

mgmtd/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ fn inner_main() -> Result<()> {
4646

4747
// Initialize logging
4848
match user_config.log_target {
49-
LogTarget::Std => Ok(env_logger::Builder::from_env(
49+
LogTarget::Stderr => Ok(env_logger::Builder::from_env(
5050
env_logger::Env::default()
5151
.default_filter_or(LevelFilter::from(user_config.log_level.clone()).as_str()),
5252
)

0 commit comments

Comments
 (0)