go-zero
go-zero copied to clipboard
In logx, can we pass callerDepth to skip some callers?
我在 go-zero 中使用 gorm,我想自定义 gorm 的 Logger,使用 logx 打印 gorm 的日志。
按照 gorm 文档实现 Interface 接口,其中一个方法实现如图:
打印日志 caller 不符合预期:
请问有没有更好的方法?
This requirement is indeed necessary. At present, there are many internal middlewares in zero, and there will be problems in using logx, which will block the real business caller.