summaryrefslogtreecommitdiff
path: root/i18nerr
diff options
context:
space:
mode:
Diffstat (limited to 'i18nerr')
-rw-r--r--i18nerr/i18nerr.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/i18nerr/i18nerr.go b/i18nerr/i18nerr.go
index 438b135..f16cf08 100644
--- a/i18nerr/i18nerr.go
+++ b/i18nerr/i18nerr.go
@@ -5,10 +5,10 @@ import (
"context"
"errors"
"fmt"
+ "log/slog"
"sync"
"codeberg.org/eduVPN/eduvpn-common/internal/http"
- "codeberg.org/eduVPN/eduvpn-common/internal/log"
"golang.org/x/text/language"
"golang.org/x/text/message"
@@ -102,12 +102,12 @@ func (e *Error) Unwrap() error {
func printerOrNew(tag language.Tag) *message.Printer {
v, ok := printers.Load(tag)
if !ok {
- log.Logger.Debugf("i18n: could not load printer with tag: '%v' from map", tag)
+ slog.Debug("i18n could not load printer from map", "tag", tag)
return message.NewPrinter(tag)
}
p, ok := v.(*message.Printer)
if !ok {
- log.Logger.Debugf("i18n: could not load printer with tag: '%v' as the type is not correct: '%T'", tag, p)
+ slog.Debug("i18n could not load printer from map with incorrect type", "tag", tag, "type", fmt.Sprintf("%T", p))
return message.NewPrinter(tag)
}
return p
@@ -165,7 +165,7 @@ func WrapInternalf(err error, disp string, args ...any) *Error {
// initializeLangs initializes the printers from the default catalog into the sync map
// we cannot do this in init() because this is too early
func inititializeLangs() {
- log.Logger.Debugf("i18n: initializing languages...")
+ slog.Debug("i18n initializing languages")
for _, t := range message.DefaultCatalog.Languages() {
printers.Store(t, message.NewPrinter(t))
}