feat(services): Logging
All checks were successful
ci/woodpecker/tag/release Pipeline was successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
2024-12-17 16:23:52 +01:00
parent 4d57cf827d
commit 11ea0858bb
5 changed files with 72 additions and 13 deletions

View File

@@ -137,9 +137,11 @@ func main() {
barcodeGenerator := &services.DefaultBarcodeService{
RedisClient: redisClient,
Logger: logger.Named("DefaultBarcodeService"),
}
staticService := &services.DefaultStaticService{
Cache: make(map[string]string),
Cache: make(map[string]string),
Logger: logger.Named("DefaultStaticService"),
}
handler := handlers.DefaultHandler{
Config: config,
@@ -148,11 +150,13 @@ func main() {
Templater: &services.DefaultTemplater{
BarcodeService: barcodeGenerator,
StaticService: staticService,
Logger: logger.Named("DefaultTemplater"),
},
Converter: &services.GotenbergConverter{
BaseUrl: config.GotenbergBaseUrl,
Logger: logger.Named("GotenbergConverter"),
},
Logger: logger,
Logger: logger.Named("DefaultHandler"),
}
logger.Debug("Initialized services")