Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #10 Co-authored-by: andrey <andrey@4devs.io> Co-committed-by: andrey <andrey@4devs.io>
17 lines
264 B
Go
17 lines
264 B
Go
package otel
|
|
|
|
import (
|
|
"context"
|
|
|
|
"gitoa.ru/go-4devs/log"
|
|
"gitoa.ru/go-4devs/log/entry"
|
|
)
|
|
|
|
func Middleware() log.Middleware {
|
|
return func(ctx context.Context, e *entry.Entry, handler log.Logger) (int, error) {
|
|
addEvent(ctx, e)
|
|
|
|
return handler(ctx, e)
|
|
}
|
|
}
|