diff --git a/logger_test.go b/logger_test.go index e8038c4..69dffed 100644 --- a/logger_test.go +++ b/logger_test.go @@ -343,7 +343,7 @@ func TestLogger_leveledWriter(t *testing.T) { logger := New(&LoggerOptions{ Name: "test", - Output: NewLevelWriter(&stdout, map[Level]io.Writer{Error: &stderr}), + Output: NewLeveledWriter(&stdout, map[Level]io.Writer{Error: &stderr}), }) logger.Error("this is an error", "who", "programmer", "why", "testing") @@ -361,7 +361,7 @@ func TestLogger_leveledWriter(t *testing.T) { logger := New(&LoggerOptions{ Name: "test", - Output: NewLevelWriter(&stdout, map[Level]io.Writer{Error: &stderr}), + Output: NewLeveledWriter(&stdout, map[Level]io.Writer{Error: &stderr}), }) logger.Info("this is test", "who", "programmer", "why", "testing") @@ -379,7 +379,7 @@ func TestLogger_leveledWriter(t *testing.T) { logger := New(&LoggerOptions{ Name: "test", - Output: NewLevelWriter(&stdout, map[Level]io.Writer{Error: &stderr}), + Output: NewLeveledWriter(&stdout, map[Level]io.Writer{Error: &stderr}), }) logger.Info("this is test", "who", "programmer", "why", "testing") diff --git a/writer.go b/writer.go index 3cb30a7..7e8ec72 100644 --- a/writer.go +++ b/writer.go @@ -48,11 +48,11 @@ type LeveledWriter struct { overrides map[Level]io.Writer } -// NewLevelWriter returns an initialized LeveledWriter. +// NewLeveledWriter returns an initialized LeveledWriter. // // standard will be used as the default writer for all log levels, // except for log levels that are defined in the overrides map. -func NewLevelWriter(standard io.Writer, overrides map[Level]io.Writer) *LeveledWriter { +func NewLeveledWriter(standard io.Writer, overrides map[Level]io.Writer) *LeveledWriter { return &LeveledWriter{ standard: standard, overrides: overrides,