Use zerolog

This commit is contained in:
Gusted 2022-08-10 01:17:04 +02:00
parent bf910f4df4
commit 1d6d90f387
No known key found for this signature in database
GPG key ID: FD821B732837125F
10 changed files with 105 additions and 295 deletions

View file

@ -6,17 +6,17 @@ import (
"net/http"
"time"
"github.com/rs/zerolog/log"
"github.com/valyala/fasthttp"
"codeberg.org/codeberg/pages/server/cache"
"codeberg.org/codeberg/pages/server/log"
"codeberg.org/codeberg/pages/server/utils"
)
type fasthttpLogger struct{}
func (fasthttpLogger) Printf(format string, args ...interface{}) {
log.Info("FastHTTP: %s", fmt.Sprintf(format, args...))
log.Printf("FastHTTP: %s", fmt.Sprintf(format, args...))
}
func SetupServer(handler fasthttp.RequestHandler) *fasthttp.Server {