fix: protocol v1

This commit is contained in:
2024-08-02 12:57:07 +02:00
parent 8f89ed7e77
commit b976bde363
23 changed files with 392 additions and 85 deletions

View File

@ -0,0 +1,19 @@
package logger
import (
"log/slog"
"github.com/pkg/errors"
)
type Level = slog.Level
func ParseLevel(s string) (Level, error) {
var level Level
if err := level.UnmarshalText([]byte(s)); err != nil {
return level, errors.WithStack(err)
}
return level, nil
}

View File

@ -0,0 +1,12 @@
package logger
import "log/slog"
var Attr = slog.Any
type Logger interface {
Debug(msg string, args ...any)
Info(msg string, args ...any)
Warn(msg string, args ...any)
Error(msg string, args ...any)
}