feat(logging): Debug logging

This commit is contained in:
Nicolai Ort 2024-12-17 15:48:12 +01:00
parent 94b766f106
commit cdd2b5e250
Signed by: niggl
GPG Key ID: 13AFA55AF62F269F

View File

@ -98,6 +98,8 @@ func initLogger() error {
defer zapLogger.Sync()
logger = zapLogger.Sugar()
logger.Debug("Initialized logger")
return nil
}
@ -151,6 +153,7 @@ func main() {
BaseUrl: config.GotenbergBaseUrl,
},
}
logger.Debug("Initialized services")
// Create a new Fiber instance
app := fiber.New(fiber.Config{
@ -176,9 +179,11 @@ func main() {
pdfv1.Post("/certificates", handler.GenerateCertificate)
v1.Get("/barcodes/:type/:content", handler.GenerateBarcode)
logger.Debug("Initialized routes")
app.Use(handler.NotFoundHandler)
docs.SwaggerInfo.BasePath = "/"
logger.Infow("Starting server", "port", config.Port)
logger.Error(app.Listen("0.0.0.0:" + config.Port))
}