Reviewed-on: #14 Co-authored-by: andrey <andrey@4devs.io> Co-committed-by: andrey <andrey@4devs.io>
This commit was merged in pull request #14.
This commit is contained in:
@@ -85,6 +85,12 @@ func WithContextValue(keys ...fmt.Stringer) Middleware {
|
||||
}
|
||||
}
|
||||
|
||||
func WithName(name string) Middleware {
|
||||
return func(ctx context.Context, data *entry.Entry, handler Logger) (int, error) {
|
||||
return handler(ctx, data.Replace(KeyName, field.StringValue(name)))
|
||||
}
|
||||
}
|
||||
|
||||
// WithCaller adds called file.
|
||||
// Deprecated: use WithSource.
|
||||
func WithCaller(key string, depth int, full bool) Middleware {
|
||||
|
||||
Reference in New Issue
Block a user