Skip to content
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

Logging helper to wire logrus to zerolog #57

Merged
merged 3 commits into from
Aug 22, 2024
Merged

Logging helper to wire logrus to zerolog #57

merged 3 commits into from
Aug 22, 2024

Conversation

ronenh
Copy link
Contributor

@ronenh ronenh commented Aug 22, 2024

OPA uses logrus, which we want to reroute to a zerolog.Logger.
This commit adds a helper that used to be in aserto-dev/logger but is only needed by binaries that import OPA.

@ronenh ronenh merged commit 252e179 into main Aug 22, 2024
3 checks passed
@ronenh ronenh deleted the logrus branch August 22, 2024 22:19
ronenh added a commit to opcr-io/policy that referenced this pull request Aug 22, 2024
The dependency on logrus was removed from aserto-dev/logger in aserto-dev/logger#8.
Support for wiring logrus to zerolog has moved to aserto-dev/runtime in aserto-dev/runtime#57.

This commit uses runtime/logger to explicitly add a logrus hook that sends logs to zerolog.

Signed-off-by: Ronen Hilewicz [email protected]
ronenh added a commit to opcr-io/policy that referenced this pull request Aug 22, 2024
The dependency on logrus was removed from aserto-dev/logger in aserto-dev/logger#8.
Support for wiring logrus to zerolog has moved to aserto-dev/runtime in aserto-dev/runtime#57.

This commit uses runtime/logger to explicitly add a logrus hook that sends logs to zerolog.

Signed-off-by: Ronen Hilewicz <[email protected]>
gertd pushed a commit to opcr-io/policy that referenced this pull request Aug 23, 2024
The dependency on logrus was removed from aserto-dev/logger in aserto-dev/logger#8.
Support for wiring logrus to zerolog has moved to aserto-dev/runtime in aserto-dev/runtime#57.

This commit uses runtime/logger to explicitly add a logrus hook that sends logs to zerolog.

Signed-off-by: Ronen Hilewicz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants