sing-box/log/nop.go

69 lines
1.2 KiB
Go
Raw Normal View History

2022-07-02 06:07:50 +00:00
package log
import "context"
2022-07-12 07:17:29 +00:00
var _ Factory = (*nopFactory)(nil)
2022-07-02 06:07:50 +00:00
2022-07-12 07:17:29 +00:00
type nopFactory struct{}
2022-07-02 06:07:50 +00:00
2022-07-12 07:17:29 +00:00
func NewNOPFactory() Factory {
return (*nopFactory)(nil)
2022-07-02 06:07:50 +00:00
}
2022-07-12 07:17:29 +00:00
func (f *nopFactory) Level() Level {
return LevelTrace
2022-07-02 17:57:04 +00:00
}
2022-07-12 07:17:29 +00:00
func (f *nopFactory) SetLevel(level Level) {
2022-07-02 17:57:04 +00:00
}
2022-07-12 07:17:29 +00:00
func (f *nopFactory) Logger() ContextLogger {
return f
2022-07-02 06:07:50 +00:00
}
2022-07-12 07:17:29 +00:00
func (f *nopFactory) NewLogger(tag string) ContextLogger {
return f
2022-07-02 06:07:50 +00:00
}
2022-07-12 07:17:29 +00:00
func (f *nopFactory) Trace(args ...any) {
2022-07-02 06:07:50 +00:00
}
2022-07-12 07:17:29 +00:00
func (f *nopFactory) Debug(args ...any) {
2022-07-02 06:07:50 +00:00
}
2022-07-12 07:17:29 +00:00
func (f *nopFactory) Info(args ...any) {
2022-07-02 06:07:50 +00:00
}
2022-07-12 07:17:29 +00:00
func (f *nopFactory) Warn(args ...any) {
2022-07-02 06:07:50 +00:00
}
2022-07-12 07:17:29 +00:00
func (f *nopFactory) Error(args ...any) {
2022-07-02 06:07:50 +00:00
}
2022-07-12 07:17:29 +00:00
func (f *nopFactory) Fatal(args ...any) {
2022-07-02 06:07:50 +00:00
}
2022-07-12 07:17:29 +00:00
func (f *nopFactory) Panic(args ...any) {
2022-07-02 06:07:50 +00:00
}
2022-07-12 07:17:29 +00:00
func (f *nopFactory) TraceContext(ctx context.Context, args ...any) {
2022-07-02 06:07:50 +00:00
}
2022-07-12 07:17:29 +00:00
func (f *nopFactory) DebugContext(ctx context.Context, args ...any) {
}
func (f *nopFactory) InfoContext(ctx context.Context, args ...any) {
}
func (f *nopFactory) WarnContext(ctx context.Context, args ...any) {
}
func (f *nopFactory) ErrorContext(ctx context.Context, args ...any) {
}
func (f *nopFactory) FatalContext(ctx context.Context, args ...any) {
}
func (f *nopFactory) PanicContext(ctx context.Context, args ...any) {
2022-07-02 06:07:50 +00:00
}