-
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-8732: Add log-file
to Vault Agent
#17841
Merged
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
ffaff37
Started work on adding log-file support to Agent
peteski22 e165ca0
Basic HCL test - added log-file
peteski22 8a3ab39
Basic test for logfile
peteski22 6d2fa5f
Logger tests
peteski22 73d396f
changelog
peteski22 4955ac0
make fmt
peteski22 511753e
updated raft-autopilot to v0.2.0
peteski22 dda4b1b
Update changelog/17841.txt
peteski22 4a82d0e
use T.tempDir()
peteski22 9a75216
Removed unneeded BytesWritten as we're not interested in tracking this
peteski22 e298b82
Removed reliance on consul testing helpers
peteski22 77a580d
Remember to return when we error
peteski22 ad8dc49
Allow log file to be picked up and appended
peteski22 e3ef2fd
Use NewLogFile everywhere
peteski22 3af776f
Tried to pull out the config aggregation from Agent.Run
peteski22 7094a07
Add test failure msg.
peteski22 dbf88a1
Clutching at straws before rolling back a few commits.
peteski22 3b2fb00
fmt (frustration creeping in)
peteski22 7cd7db6
Try to clean up after tests nicely
peteski22 6ddae7e
Typos in `sc` cmd
peteski22 3fe4a6e
Try to fix mad whitespace auto-adjustments (part 1)
peteski22 4883a11
Whitespace fixing part 2
peteski22 5eb50e3
Merge branch 'main' of github.com:hashicorp/vault
peteski22 d8e3362
Merge branch 'main' into VAULT-8732-log-file-parameter
peteski22 08be24b
go mod tidy
peteski22 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -119,3 +119,4 @@ website/components/node_modules | |
|
||
.buildcache/ | ||
.releaser/ | ||
*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:feature | ||
logging: Vault Agent supports logging to a specified file path via environment variable, CLI or config | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
pid_file = "./pidfile" | ||
log_file = "/var/log/vault/vault-agent.log" | ||
|
||
auto_auth { | ||
method "aws" { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
pid_file = "./pidfile" | ||
log_file = "/var/log/vault/vault-agent.log" | ||
|
||
auto_auth { | ||
method { | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's more than this though right? It can be a log dir, or a prefix: https://developer.hashicorp.com/consul/docs/agent/config/cli-flags#_log_file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we add the other log options (like the rotation options) as well as flags? Or alternatively, since unlike consul we have logs of config without associated flags, should we maybe not add the -log-file CLI option?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Consul yes, as Consul does rotation of logs etc. so it fiddles with the name a lot more. In Vault I took the simple approach so it's no frills.