mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-31 16:46:15 -06:00
ensure inconsistent inlining doesn't mess with log calling function name
This commit is contained in:
parent
9119897633
commit
f06affc590
17 changed files with 254 additions and 206 deletions
|
|
@ -26,7 +26,6 @@ import (
|
|||
"codeberg.org/gruf/go-bytesize"
|
||||
"codeberg.org/gruf/go-errors/v2"
|
||||
"codeberg.org/gruf/go-kv"
|
||||
"codeberg.org/gruf/go-logger/v2/level"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/gtscontext"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/gtserror"
|
||||
|
|
@ -99,11 +98,11 @@ func Logger(logClientIP bool) gin.HandlerFunc {
|
|||
l = l.WithFields(fields...)
|
||||
|
||||
// Default is info
|
||||
lvl := level.INFO
|
||||
lvl := log.INFO
|
||||
|
||||
if code >= 500 {
|
||||
// Actual server error.
|
||||
lvl = level.ERROR
|
||||
// Actual error.
|
||||
lvl = log.ERROR
|
||||
}
|
||||
|
||||
if len(c.Errors) > 0 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue