Skip to content

Commit

Permalink
fix(log): disable caller on access logging
Browse files Browse the repository at this point in the history
  • Loading branch information
rot1024 committed Jan 28, 2025
1 parent 5675c40 commit 471511f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions log/echo.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ func NewEcho() *Echo {
}

func NewEchoWith(logger *Logger) *Echo {
return &Echo{
logger: logger.AddCallerSkip(1),
}
}

func NewEchoWithRaw(logger *Logger) *Echo {
return &Echo{
logger: logger,
}
Expand Down Expand Up @@ -227,6 +233,7 @@ func (l *Echo) AccessLogger() echo.MiddlewareFunc {
if logger == nil {
logger = l.logger
}
logger = logger.WithCaller(false)

// incoming log
logger.Infow(
Expand Down

0 comments on commit 471511f

Please sign in to comment.