Repository: dusk-network/rusk (language: rust)

Issue:
Declaration in rusk.toml, log_type = 'json', isn't honored by all messages to rusk.log
**Describe the bug**
The declaration `log_type = 'json'` in the configuration file `rusk.toml` is not honored by all messages emitted to `rusk.log`

**To Reproduce**
```
$ sudo systemctl stop rusk
```
Then uncomment the second line of `/opt/dusk/conf/rusk.toml` so that it reads `log_type = 'json'`
```
$ sudo systemctl start rusk && tail -30 /var/log/rusk.log
```
Wait and you should get something like the following, which has plain text interspersed with JSON.
```
...
{"timestamp":"2025-01-06T21:20:44.816704Z","level":"INFO","event":"Ledger block loaded","height":0,"hash":"e088a453cdc875ed45eb658e404d9670846c5317e792dcb07d5824aa0ae1d150","state_root":"d90d03cf808252037ac2fdd8677868e1ac419caab09ec4cf0e87eafa86b8a612","label":"Final(0)","target":"node::chain"}
{"timestamp":"2025-01-06T21:20:44.816724Z","level":"INFO","message":"Received get_provisioners request","target":"rusk::node::vm"}
{"timestamp":"2025-01-06T21:20:44.819888Z","level":"INFO","event":"loading consensus keys","path":"/opt/dusk/conf/consensus.keys","target":"node::chain::consensus"}
"/opt/dusk/conf/consensus.keys"
{"timestamp":"2025-01-06T21:20:44.820335Z","level":"INFO","event":"loaded consensus keys","pubkey":"PublicKey { bs58: \"21mif6HvgdLoJtLzibs42LZDtnwkf3518yfhBsTfVim2WZa3j8H9E64JHK4KWdc7W5KMDvoMk7zdY9ddeE1VuNQsks1suJzWDNf5mL5yBqjzdkdfWPaJjyg4rvJ1GqREuDBq\" }","target":"node::chain::consensus"}
{"timestamp":"2025-01-06T21:20:44.827529Z","level":"INFO","event":"VM finalized state loaded","state_root":"d90d03cf808252037ac2fdd8677868e1ac419caab09ec4cf0e87eafa86b8a612","target":"node::chain::acceptor"}
{"timestamp":"2025-01-06T21:20:44.827548Z","level":"INFO","message":"RUSK_CONSENSUS_SPIN_TIME is 1736251200","target":"node::chain::acceptor"}
{"timestamp":"2025-01-06T21:20:44.827570Z","level":"INFO","message":"Waiting 52755.172433832s for consensus to be triggered at 2025-01-07T12:00:00.000Z","target":"node::chain::acceptor"}
{"timestamp":"2025-01-06T21:21:14.811301Z","level":"INFO","message":"TableMaintainer::monitor_buckets back to sleep","target":"kadcast::maintainer"}
{"timestamp":"2025-01-06T21:21:23.601196Z","level":"INFO","message":"Received event at /on/node/info","target":"rusk::http"}
Using CONSENSUS_KEYS in /opt/dusk/conf/consensus.keys
```

**Expected behaviour**
I would expect that `log_type = 'json'` would cause the log file to contain only JSON sentences


**Platform**
Fill as appropriate
 - Architecture: x86_64
 - OS: Linux
 - $ ruskquery version
You are using the latest installer version: v0.5.3.
- $ rusk --version
rusk 1.0.0 (f848ed1 2025-01-05)

 



Discussion / hints:
I'm not able to replicate the following
> Using CONSENSUS_KEYS in /opt/dusk/conf/consensus.keys

but I'm able to replicate
> "/opt/dusk/conf/consensus.keys"

ps: that "Using CONSENSUS_KEYS" is not part of the codebase anymore

Fix patch:
diff --git a/node-data/src/bls.rs b/node-data/src/bls.rs
index 817ab1fc4a..3345bbc483 100644
--- a/node-data/src/bls.rs
+++ b/node-data/src/bls.rs
@@ -167,7 +167,6 @@ fn read_from_file(
     }
 
     // attempt to load and decode wallet
-    println!("{path:?}");
     let ciphertext = fs::read(&path).map_err(|e| {
         anyhow::anyhow!(
             "{} should be valid consensus keys file {e}",


Test patch: