Replies: 1 comment
-
use your custom logger replace the ent logger... var drv dialect.Driver = driver
if cfg.Debug {
drv = entslog.New(nil, entslog.WithGenerateID(func(ctx context.Context) string {
return trace.FromTraceID(ctx)
}), entslog.WithFilter(func(ctx context.Context,attrs ...slog.Attr) []slog.Attr {
// append your custom attrs to attrs then return it
return attrs
}))(driver)
}
opts := []upload.Option{
upload.Driver(drv),
}
return upload.NewClient(opts...), nil |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to add extra field to the ent log.
Beta Was this translation helpful? Give feedback.
All reactions