Skip to content

can Logger interface provide context? #1141

@ynjgit

Description

@ynjgit

can Logger interface provide context?, we can reuse the resty.Client , but different context with Request.SetContext, so we can print the ctx infomation (eg: trace_id).

like below:
// Logger interface is to abstract the logging from Resty. Gives control to
// the Resty users, choice of the logger.
type Logger interface {
Errorf(ctx context.Context, format string, v ...interface{})
Warnf(ctx context.Context, format string, v ...interface{})
Debugf(ctx context.Context, format string, v ...interface{})
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions