Skip to content

Commit

Permalink
Pass error log to http server
Browse files Browse the repository at this point in the history
Otherwise errors will be logged on info which is confusing
when inspecting logs.
  • Loading branch information
britter committed Oct 4, 2024
1 parent 4a99745 commit 1d48ff3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func startPushServer(out chan<- *net.IP, localIp *net.IP) {

s := &http.Server{
Addr: bind,
ErrorLog: slog.NewLogLogger(slog.Default().Handler(), slog.LevelInfo),
ErrorLog: slog.NewLogLogger(slog.Default().Handler(), slog.LevelError),
}

http.HandleFunc("/ip", server.Handler)
Expand Down

0 comments on commit 1d48ff3

Please sign in to comment.