Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[core] Switch to zap for logging #240

Merged
merged 1 commit into from
Dec 21, 2021
Merged

Conversation

ricoberger
Copy link
Member

We are now using "go.uber.org/zap" for logging instead of
"github.com/sirupsen/logrus".

It is now also possible to enrich each log line via a context. This way
we can add the "userID" and "requestID" to most of the log lines and we
can add additional fields to the logging context via the
"ContextWithValue" function. For that we should always use our custom
"github.com/kobsio/kobs/pkg/log" package instead of directly using zap.

We are now using "go.uber.org/zap" for logging instead of
"github.com/sirupsen/logrus".

It is now also possible to enrich each log line via a context. This way
we can add the "userID" and "requestID" to most of the log lines and we
can add additional fields to the logging context via the
"ContextWithValue" function. For that we should always use our custom
"github.com/kobsio/kobs/pkg/log" package instead of directly using zap.
@ricoberger ricoberger force-pushed the core-switch-to-zap-for-logging branch from 12ce72f to 83100be Compare December 21, 2021 10:01
@ricoberger ricoberger merged commit d6c07b1 into main Dec 21, 2021
@ricoberger ricoberger deleted the core-switch-to-zap-for-logging branch December 21, 2021 10:17
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant