changed all "log" and "fmt" to "slog" in package main
This commit is contained in:
+2
-3
@@ -1,7 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"log/slog"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
@@ -11,8 +11,7 @@ func (s *Server) handlerRefresh(w http.ResponseWriter, req *http.Request) {
|
||||
return
|
||||
}
|
||||
if err := s.c.Refresh(); err != nil {
|
||||
// #log
|
||||
log.Printf("refresh failed: %v", err)
|
||||
slog.Error("refresh failed", "err", err)
|
||||
http.Error(w, "refresh failed", http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user