Skip to content

Commit

Permalink
fix(serve): only print with zerolog (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxime1907 authored Sep 23, 2024
1 parent a0c5ba5 commit 6b3c797
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/network/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package network

import (
"fmt"
"log"
"net/http"
"os"
"strconv"
Expand Down Expand Up @@ -118,7 +117,7 @@ func setupCacheUpdater(ovhClient *ovh.Client) {
intervalStr := os.Getenv("OVH_CACHE_UPDATE_INTERVAL")
intervalSeconds, err := strconv.Atoi(intervalStr)
if err != nil {
log.Fatalf("Failed to parse OVH_CACHE_UPDATE_INTERVAL: %v", err)
logger.Fatal().Msgf("Failed to parse OVH_CACHE_UPDATE_INTERVAL: %v", err)
}
cacheUpdateInterval := time.Duration(intervalSeconds) * time.Second

Expand All @@ -144,7 +143,7 @@ func serveRoutes(clicontext *cli.Context) error {
os.Getenv("OVH_CONSUMER_KEY"),
)
if err != nil {
log.Fatalf("Failed to create OVH client: %v", err)
logger.Fatal().Msgf("Failed to create OVH client: %v", err)
}

http.HandleFunc("/ping", pingHandler)
Expand Down

0 comments on commit 6b3c797

Please sign in to comment.