-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Open
Labels
Description
GORM Playground Link
Description
gorm logger is a great interface, with slog, the functionality is now more extensible,we can append trace/request_id attr, change source file format, output to json as we need
but when i use, logger/slog has a issue with caller source file depth
logger/slog source file not correct

Solution
by now, The official golang community explicitly does not support depth
ref issue
golang/go#73707
golang/go#59145
so i initiate a pr, abstract a common function named CallerFrame use by FileWithLineNum and slog

