Skip to content

Add Log, Logf, Logln and Logw to Suggared logger #1405

Closed
@arxeiss

Description

@arxeiss

Is your feature request related to a problem? Please describe.

When I need to do a wrapper around Zap logger to pass that into 3rd party library for unifying logging, it might come handy to use zap.Log(level, ...) instead of switch or if-else if chain.

However, now I need to do a same wrapper but with Sugared logger. And that doesn't support general Log method.

Describe the solution you'd like

func (s *SugaredLogger) Log(lvl zapcore.Level, args ...interface{}) {
	s.log(lvl, "", args, nil)
}

and the same for Logf, Logln and Logw.

Describe alternatives you've considered
none

Is this a breaking change?
No, this is not breaking change

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions