mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 04:48:26 +08:00
refactor(test): add lint rule for messages starting with the component (#2045)
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com> Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com> Signed-off-by: Andrei Aaron <aaaron@luxoft.com>
This commit is contained in:
@@ -61,3 +61,5 @@ For example, lookup a cache (fast path) and it throws a not-found error, and we
|
||||
expect to handle it and perform a slow path lookup. Instead of logging the
|
||||
lookup failure at ERROR level, it may be more appropriate to log at DEBUG level
|
||||
and then handle the error.
|
||||
|
||||
Also, instead of `Msg("error at something")` standardize on `Msg("failed at something")`.
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ type Logger struct {
|
||||
}
|
||||
|
||||
func (l Logger) Println(v ...interface{}) {
|
||||
l.Logger.Error().Msg("panic recovered")
|
||||
l.Logger.Error().Msg("panic recovered") //nolint: check-logs
|
||||
}
|
||||
|
||||
func NewLogger(level, output string) Logger {
|
||||
|
||||
Reference in New Issue
Block a user