pcmt/handlers/config.go
leo 1fb7479d8e
All checks were successful
continuous-integration/drone/push Build is passing
slogger: rename Logger to Slogger
2023-05-11 17:06:20 +02:00

27 lines
494 B
Go

package handlers
import (
"git.dotya.ml/mirre-mt/pcmt/app/settings"
"git.dotya.ml/mirre-mt/pcmt/slogging"
"golang.org/x/exp/slog"
)
var (
setting *settings.Settings
appver string
slogger *slogging.Slogger
log slogging.Slogger
)
func InitHandlers(s *settings.Settings) {
slogger = slogging.Logger()
log = *slogger // have a local copy.
log.Logger = log.Logger.With(
slog.Group("pcmt extra", slog.String("module", "handlers")),
)
setting = s
appver = setting.Version()
}