Skip to content

Commit

Permalink
feat: imporove logging
Browse files Browse the repository at this point in the history
Signed-off-by: Sven Gerber <github@gerber.uno>
  • Loading branch information
svengerber committed Mar 10, 2023
1 parent aa61a61 commit 248476f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cmd/pusher/pusher.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"os"
"net/http"
"net/url"
"log"

"github.com/gofiber/fiber/v2"
Expand All @@ -25,12 +26,16 @@ func main() {
app := fiber.New()

app.All("/push", func(c *fiber.Ctx) error {

log.Println("Sending HTTP Get request to Uptime Kuma URL")

// Only log the host of the URL
url, _ := url.Parse(util.UptimeKumaURL)
log.Println("Sending HTTP Get request to", url.Host)

_ , err := http.Get(util.UptimeKumaURL)
if err != nil {
log.Println("Error sending HTTP request to uptime kuma url", err)
}

return c.SendString("OK")
})

Expand Down

0 comments on commit 248476f

Please sign in to comment.