Skip to content
This repository has been archived by the owner on Mar 21, 2022. It is now read-only.

Commit

Permalink
Use custom logger when debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
tdemin committed Oct 13, 2020
1 parent e063c85 commit f60619b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions debug.go
Expand Up @@ -3,7 +3,6 @@
package main

import (
"log"
"net/http"
_ "net/http/pprof"
"os"
Expand All @@ -14,10 +13,10 @@ func init() {
if listen == "" {
listen = "[::]:8082"
}
log.Printf("profiling is enabled, HTTP server is attached to %s\n", listen)
stdout.Printf("profiling is enabled, HTTP server is attached to %s\n", listen)
go func() {
if err := http.ListenAndServe(listen, nil); err != nil {
log.Fatalf("http failed: %v\n", err)
stderr.Fatalf("http failed: %v\n", err)
}
}()
}

0 comments on commit f60619b

Please sign in to comment.