Skip to content

Commit e55be0d

Browse files
committed
refactor(logger): use standard log writer and flags
Replace direct os.Stderr usage with log.Writer() to maintain consistency with Go's standard logging patterns. Add log.LstdFlags to include timestamps in log output, which improves log readability and debugging.
1 parent f185e1a commit e55be0d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

logger.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package main
33
import (
44
"encoding/json"
55
"log"
6-
"os"
76
)
87

98
var _ logger = (*stdLogger)(nil)
@@ -21,7 +20,7 @@ type stdLogger struct {
2120
func newStdLogger(debug bool) *stdLogger {
2221
return &stdLogger{
2322
debug: debug,
24-
stderr: log.New(os.Stderr, "", 0),
23+
stderr: log.New(log.Writer(), "", log.LstdFlags),
2524
}
2625
}
2726

0 commit comments

Comments
 (0)