Skip to content

how to disable the stdout log color? #1871

Open
@YANGJINJUE

Description

@YANGJINJUE

how to disable the request url log color

Checklist

  • Dependencies installed
  • No typos
  • Searched existing issues and docs

Expected behaviour

if request success stdout print 200

Actual behaviour

if request success stdout will print 32m200

Steps to reproduce

e.Use(middleware.Logger())

Working code to debug


import (
  "net/http"
  "github.com/labstack/echo/v4"
  "github.com/labstack/echo/v4/middleware"
)

func main() {
  // Echo instance
  e := echo.New()

  // Middleware
  e.Use(middleware.Logger())
  e.Use(middleware.Recover())

  // Routes
  e.GET("/", hello)

  // Start server
  e.Logger.Fatal(e.Start(":1323"))
}

// Handler
func hello(c echo.Context) error {
  return c.String(http.StatusOK, "Hello, World!")
}

Version/commit

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