ac128e2f40
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
Build and Test Go Project / build (macos-latest) (push) Has been cancelled
Build and Test Go Project / build (ubuntu-latest) (push) Has been cancelled
Build and Test Go Project / build (windows-latest) (push) Has been cancelled
22 lines
500 B
Go
22 lines
500 B
Go
package log
|
|
|
|
import (
|
|
"context"
|
|
"log/slog"
|
|
)
|
|
|
|
type Logger interface {
|
|
Log(ctx context.Context, level Level, msg string, fields ...slog.Attr)
|
|
Debug(msg string, fields ...slog.Attr)
|
|
Info(msg string, fields ...slog.Attr)
|
|
Warn(msg string, fields ...slog.Attr)
|
|
Error(msg string, fields ...slog.Attr)
|
|
Fatal(msg string, fields ...slog.Attr)
|
|
WithFields(fields ...slog.Attr) Logger
|
|
WithError(err error) Logger
|
|
Named(name string) Logger
|
|
WithLevel(level Level) Logger
|
|
Sync() error
|
|
Level() Level
|
|
}
|