Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2023-09-14 17:59:12 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2023-09-15 13:37:43 +0300
commit2a006c4ee8b47887ddc1274dab9f645caf679c41 (patch)
treef8ff40264468d2c643ffad109201f95e1a01fa6c /STYLE.md
parent47bcacea13a24cc3712900de3b2039d8efbce7f9 (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.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/STYLE.md b/STYLE.md
index bbd390894..594a65728 100644
--- a/STYLE.md
+++ b/STYLE.md
@@ -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