Skip to content
Snippets Groups Projects
Commit 7ff5003d authored by John Harris's avatar John Harris
Browse files

fix: alter constructor to be logger specific

parent a7a7db1c
No related branches found
No related tags found
No related merge requests found
...@@ -6,7 +6,7 @@ import ( ...@@ -6,7 +6,7 @@ import (
"strings" "strings"
) )
func New(opts ...Option) *slog.Logger { func NewLogger(opts ...Option) *slog.Logger {
options := &Options{ options := &Options{
Leveler: slog.LevelDebug, Leveler: slog.LevelDebug,
Writer: os.Stdout, Writer: os.Stdout,
......
...@@ -21,7 +21,7 @@ func TestNew(t *testing.T) { ...@@ -21,7 +21,7 @@ func TestNew(t *testing.T) {
// Arrange // Arrange
var buf bytes.Buffer var buf bytes.Buffer
logger := New(WithWriter(&buf)) logger := NewLogger(WithWriter(&buf))
// Act // Act
logger.Info("Foo", slog.String("bar", "baz")) logger.Info("Foo", slog.String("bar", "baz"))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment