Skip to content

Commit

Permalink
Rename for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
dbhoot committed Apr 12, 2024
1 parent 14d332b commit 1c66443
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func NewLogger(output io.Writer, prefix string, flag int) Logger {
return &logger{l: log.New(output, prefix, flag)}
}

func NewStandardLogger(l *log.Logger) Logger {
func NewFromStandardLogger(l *log.Logger) Logger {
return &logger{l: l}
}

Expand Down
4 changes: 2 additions & 2 deletions logger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ func TestLogger(t *testing.T) {
tests.AssertContains(t, buf.String(), "warn", true)
}

func TestStandardLogger(t *testing.T) {
func TestFromStandardLogger(t *testing.T) {
buf := new(bytes.Buffer)
l := NewStandardLogger(log.New(buf, "", log.Ldate|log.Lmicroseconds))
l := NewFromStandardLogger(log.New(buf, "", log.Ldate|log.Lmicroseconds))
c := tc().SetLogger(l)
c.SetProxyURL(":=\\<>ksfj&*&sf")
tests.AssertContains(t, buf.String(), "error", true)
Expand Down

0 comments on commit 1c66443

Please sign in to comment.