feat: allow logging output to use JSON formatter #1705
Merged
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.
Title: Enable JSON Logging - PR for Issue #28
Description:
This PR addresses and resolves the long-standing issue #28 in the
containrrr/watchtower
repository. The issue is related to enabling JSON logging for the application.Changes:
--json-logging
that enables the JSON log formatter for logging.WATCHTOWER_JSON_LOGGING
to control JSON logging behavior.Context:
As this is my first-ever Pull Request, I'm excited to contribute to the
containrrr/watchtower
project. I'm building a log scraping application and enabling JSON logging will greatly facilitate log parsing and analysis in my use case.Testing:
I have included comprehensive test coverage for the new argument in the
flags_test.go
file, ensuring proper functionality and compatibility with existing features.I would greatly appreciate feedback and guidance on any improvements that can be made to this PR. Looking forward to contributing more to the project in the future! Thank you for considering this pull request.