feat(rp): Enable logging

This commit is contained in:
Karolin Varner
2025-08-02 16:52:06 +02:00
parent edcbf290fc
commit c689f8e78a
3 changed files with 8 additions and 0 deletions

2
Cargo.lock generated
View File

@@ -2228,10 +2228,12 @@ dependencies = [
"anyhow", "anyhow",
"base64ct", "base64ct",
"ctrlc-async", "ctrlc-async",
"env_logger",
"futures", "futures",
"futures-util", "futures-util",
"genetlink", "genetlink",
"libc", "libc",
"log",
"netlink-packet-core", "netlink-packet-core",
"netlink-packet-generic", "netlink-packet-generic",
"netlink-packet-wireguard", "netlink-packet-wireguard",

View File

@@ -18,6 +18,8 @@ toml = { workspace = true }
x25519-dalek = { workspace = true, features = ["static_secrets"] } x25519-dalek = { workspace = true, features = ["static_secrets"] }
zeroize = { workspace = true } zeroize = { workspace = true }
libc = { workspace = true } libc = { workspace = true }
log = { workspace = true }
env_logger = { workspace = true }
rosenpass = { workspace = true } rosenpass = { workspace = true }
rosenpass-ciphers = { workspace = true } rosenpass-ciphers = { workspace = true }

View File

@@ -24,6 +24,10 @@ async fn main() -> anyhow::Result<()> {
} }
}; };
// init logging
// TODO: Taken from rosenpass; we should deduplicate the code.
env_logger::Builder::from_default_env().init(); // sets log level filter from environment (or defaults)
let command = cli.command.unwrap(); let command = cli.command.unwrap();
match command { match command {