diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2023-09-14 17:59:12 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2023-09-15 13:37:43 +0300 |
commit | 2a006c4ee8b47887ddc1274dab9f645caf679c41 (patch) | |
tree | f8ff40264468d2c643ffad109201f95e1a01fa6c /STYLE.md | |
parent | 47bcacea13a24cc3712900de3b2039d8efbce7f9 (diff) |
log: Wrap the logrus logger
Introduce a wrapper for the logrus logging infrastructure. This is a
first step towards abstracting away the actual implementation of our
logs behind a type that we can iterate on and will thus pave the way
towards adoption of the `slog` package.
Note that this is only one step of this transition. The interface does
not yet roundtrip to itself, e.g. calling `log.Logger.WithError()` will
result in a `logrus.Entry`, not in a `log.Logger`. This will be handled
at a later point.
Diffstat (limited to 'STYLE.md')
-rw-r--r-- | STYLE.md | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -201,9 +201,9 @@ event. When logging an error, use the `WithError(err)` method. -### Use the `logrus.FieldLogger` interface +### Use the `log.Logger` interface -In case you want to pass around the logger, use the `logrus.FieldLogger` +In case you want to pass around the logger, use the `log.Logger` interface instead of either `*logrus.Entry` or `*logrus.Logger`. ### Use snake case for fields |