-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vault agent does not write all messages to log file #21109
Comments
I got involved in this when it was posted in discuss.hashicorp.com... looking into it, the root cause is that the consul-template code uses a completely different logging setup to Vault (The Go stdlib log package, instead of HashiCorp's go-hclog). Another bug caused by this, is that if you request the agent to emit JSON logging (
A thorough fix to this issue would require replacing the logging system in consul-template with go-hclog too. |
Hey folks! Thanks for raising this and providing such good detail, both. As maxb points out, the issue with the logs that you're missing are specifically the ones from the I can't give an estimate for a fix, but I wanted to update this to say that I just raised an issue internally for this and it's something I'll try and encourage prioritizing. We'll update this issue when we fix it! |
Describe the bug
When configuring the vault agent to log to a file, only some messages are written.
For example, run the agent as follows:
The entries with messages that begin with parenthesis are not 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.
To Reproduce
Steps to reproduce the behavior:
vault agent -config=/vault/agent.hcl -log-file=/vault/agent.log
Expected behavior
All messages written to the console are also written to the log file.
Environment:
vault status
): v1.13.2vault version
): v1.13.2The text was updated successfully, but these errors were encountered: