mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2025-12-19 08:20:05 +08:00
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
82 lines
1.7 KiB
Go
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{}
|