Add structured logs with logrus library, for logs that contain hashes - #330
Merged
toastwaffle merged 3 commits intoSep 1, 2025
Conversation
toastwaffle
requested changes
Aug 18, 2025
toastwaffle
approved these changes
Aug 20, 2025
| @@ -65,6 +65,7 @@ const ( | |||
| const DefaultMaxSize int64 = 200 * 1012 // 200 Kelly-Bootle standard units | |||
|
|
|||
| var log = logging.MustGetLogger() | |||
Contributor
There was a problem hiding this comment.
ah. We did already have another logging library, but it looks like it doesn't support structured logging. We should probably plan to swap out github.com/peterebden/go-cli-init/v4/logging for logrus everywhere (but probably not in this PR)
@Hamishpk what do you think?
Contributor
There was a problem hiding this comment.
Yeah makes sense. Although it looks like we can just replace log with logr here at it should work? log would be better though
chryssakr
force-pushed
the
INFRA-65710-use-structured-logs-in-mettle
branch
from
August 21, 2025 15:42
04c6e68 to
9f4586f
Compare
chryssakr
force-pushed
the
INFRA-65710-use-structured-logs-in-mettle
branch
from
August 22, 2025 10:57
9f4586f to
45c840e
Compare
toastwaffle
approved these changes
Sep 1, 2025
This was referenced Sep 30, 2025
Merged
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Changed the logs that included hashes to use structured logs using the logrus library. In that way we have the hash as a parameter that can be used for searching in Kibana. We need to use another library here because the common logger that offers logs with fields is unavailable in the github repository.