-
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
Fix non-JSON log messages when using -log-format
JSON
#24252
Merged
peteski22
merged 12 commits into
main
from
peteski22/VAULT-17149/consul-template-logs-json
Nov 29, 2023
Merged
Changes from 3 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
ccd269c
Fix non-JSON log messages when using -log-format JSON
peteski22 b8072b1
The elusive extra line
peteski22 9cccf87
Adjust the approach
peteski22 d9839b7
changelog
peteski22 e9c9485
Infer levels *with* timestamp prefix
peteski22 6c793ad
InferLeveslWithTimestamp required InferLevels
peteski22 0ec4044
Merge branch 'main' into peteski22/VAULT-17149/consul-template-logs-json
peteski22 3f169ac
Update changelog/24252.txt
peteski22 426c2fe
Test to show -log-format and -log-file working in consul-template gen…
peteski22 ee2cda0
Merge branch 'peteski22/VAULT-17149/consul-template-logs-json' of git…
peteski22 77e4343
classic typo
peteski22 88d6251
Merge branch 'main' into peteski22/VAULT-17149/consul-template-logs-json
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
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 |
---|---|---|
|
@@ -11,7 +11,6 @@ import ( | |
ctconfig "github.com/hashicorp/consul-template/config" | ||
ctlogging "github.com/hashicorp/consul-template/logging" | ||
"github.com/hashicorp/go-hclog" | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nobody likes the extra line. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
"github.com/hashicorp/vault/command/agent/config" | ||
"github.com/hashicorp/vault/sdk/helper/pointerutil" | ||
) | ||
|
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.
Since the error is of type multierror.Error, you may want to use
errs.ErrorOrNil()
on the return.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.
Thanks @hghaf099, do you mean like this?
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.
Ah, my bad. It seems that we only need to return if the error is non-nil. Then what you already had is sufficient. Sorry for the confusion.