mirror of
https://github.com/byReqz/probehost2.git
synced 2024-11-21 14:23:15 +00:00
convert file to use spaces
This commit is contained in:
parent
016dd7662a
commit
8b1b28b274
5
main.go
5
main.go
@ -17,7 +17,7 @@ func init() {
|
||||
logstdout.SetFormatter(&log.TextFormatter{
|
||||
FullTimestamp: true})
|
||||
logstdout.SetOutput(os.Stdout)
|
||||
logstdout.SetLevel(log.WarnLevel)
|
||||
logstdout.SetLevel(log.InfoLevel)
|
||||
|
||||
logpath, err := os.OpenFile("probehost2.log", os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0660)
|
||||
if err != nil {
|
||||
@ -106,6 +106,7 @@ func main() {
|
||||
http.HandleFunc("/ping/", ping)
|
||||
http.HandleFunc("/mtr/", mtr)
|
||||
http.HandleFunc("/", showhelp)
|
||||
fmt.Println("Serving on :8000")
|
||||
logstdout.Info("Serving on :8000")
|
||||
logfile.Info("Serving on :8000")
|
||||
http.ListenAndServe(":8000", nil)
|
||||
}
|
Loading…
Reference in New Issue
Block a user