mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-28 14:03:34 -06:00
[chore] ensure consistent caller name fetching regardless of compiler inlining (#3323)
* move logging levels into log package itself * ensure inconsistent inlining doesn't mess with log calling function name * remove unused global variable * fix log level
This commit is contained in:
parent
747c251df6
commit
77b095a8c3
17 changed files with 292 additions and 204 deletions
|
|
@ -22,7 +22,6 @@ import (
|
|||
"time"
|
||||
|
||||
"codeberg.org/gruf/go-kv"
|
||||
"codeberg.org/gruf/go-logger/v2/level"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/log"
|
||||
"github.com/uptrace/bun"
|
||||
)
|
||||
|
|
@ -50,7 +49,7 @@ func (queryHook) AfterQuery(ctx context.Context, event *bun.QueryEvent) {
|
|||
|
||||
// On trace, we log query information,
|
||||
// manually crafting so DB query not escaped.
|
||||
case log.Level() >= level.TRACE:
|
||||
case log.Level() >= log.TRACE:
|
||||
log.Printf("level=TRACE duration=%s query=%s", dur, event.Query)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue