This commit is contained in:
wangchuxiao
2023-03-13 10:03:23 +08:00
parent a348af74fa
commit d73ab781fe
4 changed files with 26 additions and 13 deletions
+17
View File
@@ -0,0 +1,17 @@
package log
import "context"
type Logger interface {
Debug(ctx context.Context, msg string, keysAndValues ...interface{})
Info(ctx context.Context, msg string, keysAndValues ...interface{})
Warn(ctx context.Context, msg string, err error, keysAndValues ...interface{})
Error(ctx context.Context, msg string, err error, keysAndValues ...interface{})
WithValues(keysAndValues ...interface{}) LogrusLogger
WithName(name string) LogrusLogger
WithCallDepth(depth int) LogrusLogger
WithItemSampler() LogrusLogger
// WithoutSampler returns the original logger without sampling
WithoutSampler() LogrusLogger
}