diff --git a/config-raw.json b/config-raw.json index bcfc8389e..ba57eb75c 100644 --- a/config-raw.json +++ b/config-raw.json @@ -415,11 +415,6 @@ "default_value": "stdout", "comment": "Whether to log http requests or not. Possible values are stdout, stderr, file or off to disable http logging." }, - { - "key": "echo", - "default_value": "off", - "comment": "Echo has its own logging which usually is unnecessary, which is why it is disabled by default. Possible values are stdout, stderr, file or off to disable standard logging." - }, { "key": "events", "default_value": "off", diff --git a/pkg/config/config.go b/pkg/config/config.go index f1590b4a5..6cd6cd084 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -141,7 +141,6 @@ const ( LogDatabase Key = `log.database` LogDatabaseLevel Key = `log.databaselevel` LogHTTP Key = `log.http` - LogEcho Key = `log.echo` LogPath Key = `log.path` LogEvents Key = `log.events` LogEventsLevel Key = `log.eventslevel` @@ -405,7 +404,6 @@ func InitDefaultConfig() { LogDatabase.setDefault("off") LogDatabaseLevel.setDefault("WARNING") LogHTTP.setDefault("stdout") - LogEcho.setDefault("off") LogPath.setDefault(ServiceRootpath.GetString() + "/logs") LogEvents.setDefault("off") LogEventsLevel.setDefault("INFO") diff --git a/pkg/routes/routes.go b/pkg/routes/routes.go index fce0ce239..396d8490f 100644 --- a/pkg/routes/routes.go +++ b/pkg/routes/routes.go @@ -82,7 +82,6 @@ import ( sentryecho "github.com/getsentry/sentry-go/echo" "github.com/labstack/echo/v4" "github.com/labstack/echo/v4/middleware" - elog "github.com/labstack/gommon/log" "github.com/ulule/limiter/v3" ) @@ -116,14 +115,7 @@ func NewEcho() *echo.Echo { e.HideBanner = true - if l, ok := e.Logger.(*elog.Logger); ok { - if !config.LogEnabled.GetBool() || config.LogEcho.GetString() == "off" { - l.SetLevel(elog.OFF) - } - l.EnableColor() - l.SetHeader(log.ErrFmt) - l.SetOutput(log.GetLogWriter(config.LogEcho.GetString(), "echo")) - } + e.Logger = log.NewEchoLogger(config.LogEnabled.GetBool(), config.LogHTTP.GetString(), config.LogFormat.GetString()) // Logger if config.LogEnabled.GetBool() && config.LogHTTP.GetString() != "off" {