Skip to content

Commit

Permalink
Add current time to go webhook standard output
Browse files Browse the repository at this point in the history
This is just a small addition for better debugging of notifications send
by Alertmanager.
  • Loading branch information
mxinden committed Jul 16, 2017
1 parent ca8d73a commit 709a2e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/webhook/echo.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"fmt"
"io/ioutil"
"net/http"
"time"
)

func main() {
Expand All @@ -19,6 +20,6 @@ func main() {
if err := json.Indent(&buf, b, " >", " "); err != nil {
panic(err)
}
fmt.Println(buf.String())
fmt.Println(time.Now().String() + ": " + buf.String())
}))
}

0 comments on commit 709a2e6

Please sign in to comment.