Skip to content

Commit

Permalink
pre-commit: ban Msgf() from zerolog
Browse files Browse the repository at this point in the history
Signed-off-by: Sumner Evans <[email protected]>
  • Loading branch information
sumnerevans committed Dec 24, 2023
1 parent 79ab7f6 commit 7fa3dbd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: trailing-whitespace
exclude_types: [markdown]
Expand All @@ -13,3 +13,8 @@ repos:
hooks:
- id: go-imports-repo
- id: go-vet-repo-mod

- repo: https://github.com/beeper/pre-commit-go
rev: v0.2.1
hooks:
- id: zerolog-ban-msgf
2 changes: 1 addition & 1 deletion dbutil/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,5 @@ func (z zeroLogger) QueryTiming(ctx context.Context, method, query string, args
}

func (z zeroLogger) Warn(msg string, args ...interface{}) {
z.l.Warn().Msgf(msg, args...)
z.l.Warn().Msgf(msg, args...) // zerolog-allow-msgf
}

0 comments on commit 7fa3dbd

Please sign in to comment.