Skip to content

Shouldn't middleware.Logger's default output to be the same as echo.Logger #1260

Closed
@nattawitc

Description

@nattawitc

Issue Description

The current behavior of middleware.Logger() is kind of counter-intuitive. When I set echo.Logger.SetOutput to be something else, I expect all log from echo should go to them. But right now if I use echo.Use(middleware.Logger()), the log will still write to os.Stdout.

I think the DefaultLoggerConfig.Output should be set to nil, and at the end of middleware.LoggerWithConfig, if config.Output == nil then use context.Logger.Output() instead

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions