diff options
author | Oleksandr Redko <Oleksandr_Redko@epam.com> | 2023-08-17 12:16:08 +0300 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2023-08-23 22:52:37 +0200 |
commit | 65871d5cf48d50935cf6e2d18483c32736c2730d (patch) | |
tree | 9ab88d1dd7b1bbe6890f3791e6412bb45779b60a /common | |
parent | 2e4bf89ec7499e91fd406ccce122ca44f02dc092 (diff) |
common/loggers: Fix typo in option name
Diffstat (limited to 'common')
-rw-r--r-- | common/loggers/logger.go | 18 | ||||
-rw-r--r-- | common/loggers/logger_test.go | 2 |
2 files changed, 10 insertions, 10 deletions
diff --git a/common/loggers/logger.go b/common/loggers/logger.go index 1bdab991b..a50502897 100644 --- a/common/loggers/logger.go +++ b/common/loggers/logger.go @@ -37,13 +37,13 @@ var ( // Options defines options for the logger. type Options struct { - Level logg.Level - Stdout io.Writer - Stderr io.Writer - Distinct bool - StoreErrors bool - HandlerPost func(e *logg.Entry) error - SuppresssStatements map[string]bool + Level logg.Level + Stdout io.Writer + Stderr io.Writer + Distinct bool + StoreErrors bool + HandlerPost func(e *logg.Entry) error + SuppressStatements map[string]bool } // New creates a new logger with the given options. @@ -97,8 +97,8 @@ func New(opts Options) Logger { logHandler = newStopHandler(logOnce, logHandler) } - if opts.SuppresssStatements != nil && len(opts.SuppresssStatements) > 0 { - logHandler = newStopHandler(newSuppressStatementsHandler(opts.SuppresssStatements), logHandler) + if opts.SuppressStatements != nil && len(opts.SuppressStatements) > 0 { + logHandler = newStopHandler(newSuppressStatementsHandler(opts.SuppressStatements), logHandler) } logger := logg.New( diff --git a/common/loggers/logger_test.go b/common/loggers/logger_test.go index 6aa540b0b..1b42eff53 100644 --- a/common/loggers/logger_test.go +++ b/common/loggers/logger_test.go @@ -110,7 +110,7 @@ func TestSuppressStatements(t *testing.T) { opts := loggers.Options{ StoreErrors: true, - SuppresssStatements: map[string]bool{ + SuppressStatements: map[string]bool{ "error-1": true, }, } |