diff --git a/crates/cfg/src/v1/mod.rs b/crates/cfg/src/v1/mod.rs index 12b3ee8..6fff6dc 100644 --- a/crates/cfg/src/v1/mod.rs +++ b/crates/cfg/src/v1/mod.rs @@ -95,10 +95,10 @@ pub enum LogLevel { Debug, /// Things are proceeding as expected. + #[default] Info, /// Something does not appear to be correct. - #[default] Warning, /// Something is wrong (but kmip2pkcs11 can recover). diff --git a/etc/config.toml b/etc/config.toml index a97a5d6..4edb9cd 100644 --- a/etc/config.toml +++ b/etc/config.toml @@ -49,7 +49,7 @@ version = "v1" # - 'info': Things are proceeding as expected. # - 'warning': Something does not appear to be correct. # - 'error': Something went wrong (but kmip2pkcs11 can recover). -#log-level = "warning" +#log-level = "info" # The location the daemon writes logs to. # diff --git a/etc/config.toml.system-service b/etc/config.toml.system-service index 9b42d38..eba192e 100644 --- a/etc/config.toml.system-service +++ b/etc/config.toml.system-service @@ -1,5 +1,9 @@ -# Configuration for kmip2pkcs11 when run as a system service. -# ============================================================================ +# Configuring kmip2pkcs11 for system-wide use +# =========================================== +# +# This configuration file is packaged with kmip2pkcs11 for system-wide setups +# (e.g. with systemd). See 'config.toml' for a complete description of the +# settings and their defaults. version = "v1" @@ -9,23 +13,6 @@ version = "v1" #lib-path = "/path/to/your/pkcs11.so" [daemon] -daemonize = true - -# The minimum log level to output (error, warn, info, debug, or trace). -#log_level = "warning" - -# The target for logging (stderr, syslog or file). +log-level = "info" log-target = { type = "syslog" } - -#[server] -# The network address and port to listen on for incoming KMIP TLS requests. -# Note: If systemd supplies a socket to listen on via socket activation that -# will be used instead of these settings. -#addr = "127.0.0.1:5696" - -#[server.identity] -# Optional path to ia TLS certificate and key to use (in PEM format). -# When one or both settings are NOT specified a self-signed TLS certificate -# will be generated automatically. -#cert_path = "/path/to/cert/file" -#key_path = "/path/to/key/file" +daemonize = true diff --git a/pkg/common/kmip2pkcs11.kmip2pkcs11.service b/pkg/common/kmip2pkcs11.kmip2pkcs11.service index ccab1ca..72949db 100644 --- a/pkg/common/kmip2pkcs11.kmip2pkcs11.service +++ b/pkg/common/kmip2pkcs11.kmip2pkcs11.service @@ -4,7 +4,7 @@ Documentation=man:kmip2pkcs11(1) After=network.target [Service] -ExecStart=/usr/bin/kmip2pkcs11 --config=/etc/kmip2pkcs11/config.toml --syslog +ExecStart=/usr/bin/kmip2pkcs11 --config=/etc/kmip2pkcs11/config.toml Type=exec Restart=on-failure User=kmip2pkcs11