mihomo/log/sing.go
wwqgtxx 9e57b298bf
Some checks failed
Test / test (1.20, ubuntu-latest) (push) Failing after 1s
Test / test (1.21, ubuntu-latest) (push) Failing after 1s
Test / test (1.22, ubuntu-latest) (push) Failing after 1s
Test / test (1.23, ubuntu-latest) (push) Failing after 1s
Test / test (1.24, ubuntu-latest) (push) Failing after 1s
Trigger CMFA Update / trigger-CMFA-update (push) Failing after 1s
Test / test (1.20, macos-13) (push) Has been cancelled
Test / test (1.20, macos-latest) (push) Has been cancelled
Test / test (1.20, ubuntu-24.04-arm) (push) Has been cancelled
Test / test (1.20, windows-latest) (push) Has been cancelled
Test / test (1.21, macos-13) (push) Has been cancelled
Test / test (1.21, macos-latest) (push) Has been cancelled
Test / test (1.21, ubuntu-24.04-arm) (push) Has been cancelled
Test / test (1.21, windows-latest) (push) Has been cancelled
Test / test (1.22, macos-13) (push) Has been cancelled
Test / test (1.22, macos-latest) (push) Has been cancelled
Test / test (1.22, ubuntu-24.04-arm) (push) Has been cancelled
Test / test (1.22, windows-latest) (push) Has been cancelled
Test / test (1.23, macos-13) (push) Has been cancelled
Test / test (1.23, macos-latest) (push) Has been cancelled
Test / test (1.23, ubuntu-24.04-arm) (push) Has been cancelled
Test / test (1.23, windows-latest) (push) Has been cancelled
Test / test (1.24, macos-13) (push) Has been cancelled
Test / test (1.24, macos-latest) (push) Has been cancelled
Test / test (1.24, ubuntu-24.04-arm) (push) Has been cancelled
Test / test (1.24, windows-latest) (push) Has been cancelled
chore: update dependencies
2025-05-03 15:06:13 +08:00

82 lines
1.7 KiB
Go

package log
import (
"context"
"fmt"
L "github.com/metacubex/sing/common/logger"
)
type singLogger struct{}
func (l singLogger) TraceContext(ctx context.Context, args ...any) {
Debugln(fmt.Sprint(args...))
}
func (l singLogger) DebugContext(ctx context.Context, args ...any) {
Debugln(fmt.Sprint(args...))
}
func (l singLogger) InfoContext(ctx context.Context, args ...any) {
Infoln(fmt.Sprint(args...))
}
func (l singLogger) WarnContext(ctx context.Context, args ...any) {
Warnln(fmt.Sprint(args...))
}
func (l singLogger) ErrorContext(ctx context.Context, args ...any) {
Errorln(fmt.Sprint(args...))
}
func (l singLogger) FatalContext(ctx context.Context, args ...any) {
Fatalln(fmt.Sprint(args...))
}
func (l singLogger) PanicContext(ctx context.Context, args ...any) {
Fatalln(fmt.Sprint(args...))
}
func (l singLogger) Trace(args ...any) {
Debugln(fmt.Sprint(args...))
}
func (l singLogger) Debug(args ...any) {
Debugln(fmt.Sprint(args...))
}
func (l singLogger) Info(args ...any) {
Infoln(fmt.Sprint(args...))
}
func (l singLogger) Warn(args ...any) {
Warnln(fmt.Sprint(args...))
}
func (l singLogger) Error(args ...any) {
Errorln(fmt.Sprint(args...))
}
func (l singLogger) Fatal(args ...any) {
Fatalln(fmt.Sprint(args...))
}
func (l singLogger) Panic(args ...any) {
Fatalln(fmt.Sprint(args...))
}
type singInfoToDebugLogger struct {
singLogger
}
func (l singInfoToDebugLogger) InfoContext(ctx context.Context, args ...any) {
Debugln(fmt.Sprint(args...))
}
func (l singInfoToDebugLogger) Info(args ...any) {
Debugln(fmt.Sprint(args...))
}
var SingLogger L.ContextLogger = singLogger{}
var SingInfoToDebugLogger L.ContextLogger = singInfoToDebugLogger{}