From 709a2e687d5272d636d959543d02556360cf92cb Mon Sep 17 00:00:00 2001 From: Max Leonard Inden Date: Sun, 16 Jul 2017 20:16:49 +0200 Subject: [PATCH] Add current time to go webhook standard output This is just a small addition for better debugging of notifications send by Alertmanager. --- examples/webhook/echo.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/webhook/echo.go b/examples/webhook/echo.go index 43ccf1b4bc..9be5c5ac50 100644 --- a/examples/webhook/echo.go +++ b/examples/webhook/echo.go @@ -6,6 +6,7 @@ import ( "fmt" "io/ioutil" "net/http" + "time" ) func main() { @@ -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()) })) }