chore: use json logger

This commit is contained in:
2026-03-09 09:23:31 +01:00
parent bc900e1450
commit a27b4a66e6
6 changed files with 31 additions and 11 deletions
+12 -7
View File
@@ -57,12 +57,17 @@ func PathFromUID(uid string) (string, error) {
func SourceSet(src string) string {
sb := strings.Builder{}
for i := range 19 {
sb.WriteString(fmt.Sprintf("%s?w=%d %dw, ", src, 100*(i+1), 100*(i+1)))
const steps = 300
const max = 1500
i := 1
for {
width := i * steps
sb.WriteString(fmt.Sprintf("%s?w=%d %dw, ", src, width, width))
if width >= max {
return sb.String()
}
sb.WriteRune(',')
i++
}
i := 20
sb.WriteString(fmt.Sprintf("%s?w=%d %dw", src, 100*(i+1), 100*(i+1)))
return sb.String()
}
+3
View File
@@ -2,6 +2,7 @@ package config
import (
"context"
"log/slog"
"github.com/sethvargo/go-envconfig"
)
@@ -11,6 +12,8 @@ type Cfg struct {
Cache *ValkeyConfig `env:", prefix=CACHE_"`
Image *ImageConfig `env:", prefix=IMAGE_"`
Tracking *UmamiConfig `env:", prefix=TRACKING_"`
LogLevel slog.Level `env:"LOG_LEVEL, default=DEBUG"`
}
type WebdavConfig struct {