feat: add With func

This commit is contained in:
tiglog 2023-10-17 17:21:34 +08:00
parent 9ad207f6c9
commit e2ac9a7704

View File

@ -95,6 +95,9 @@ func Default() *Logger { return std }
func ReplaceDefault(l *Logger) { std = l } func ReplaceDefault(l *Logger) { std = l }
func SetLevel(level Level) { std.SetLevel(level) } func SetLevel(level Level) { std.SetLevel(level) }
func With(fields ...Field) {
std.l.With(fields...)
}
func Debug(msg string, fields ...Field) { std.Debug(msg, fields...) } func Debug(msg string, fields ...Field) { std.Debug(msg, fields...) }
func Info(msg string, fields ...Field) { std.Info(msg, fields...) } func Info(msg string, fields ...Field) { std.Info(msg, fields...) }