Vault agent logging

I am trying to log all the output from an agent to a file as follows:

vault agent -config=/vault/agent.hcl -log-file=/vault/agent.log -log-level=trace

However, none of the entries with messages that begin with parenthesis are sent to the file, only the ones with context or source names. For example, the first two lines below are written to the logfile, but not the last two lines.

2023-06-08T19:09:18.846-0600 [INFO]  agent.sink.file: token written: path=/vault/sink
2023-06-08T19:09:18.867-0600 [INFO]  agent.auth.handler: renewed auth token
2023-06-08T19:09:19.214-0600 [INFO] (runner) rendered "/vault/tmpl" => "/vault/cred"
2023-06-08T19:09:19.214-0600 [INFO] (runner) executing command "..."

Is that configurable?

Interesting find. A very quick look suggests this is probably a defect in the code, where the logging from the consul-template subsystem doesn’t actually get hooked up to the same output as the main Vault logging.

(And so it would be worth filing a GitHub issue about.)

Thanks for confirming, I have filed an issue at #21109.