mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-14 18:30:02 +08:00
@@ -107,6 +107,13 @@ func Debugv(v any) {
|
||||
}
|
||||
}
|
||||
|
||||
// Debugfn writes function result into access log.
|
||||
func Debugfn(fn func() string) {
|
||||
if shallLog(DebugLevel) {
|
||||
writeDebug(fn())
|
||||
}
|
||||
}
|
||||
|
||||
// Debugw writes msg along with fields into the access log.
|
||||
func Debugw(msg string, fields ...LogField) {
|
||||
if shallLog(DebugLevel) {
|
||||
@@ -229,6 +236,13 @@ func Infov(v any) {
|
||||
}
|
||||
}
|
||||
|
||||
// Infofn writes function result into access log.
|
||||
func Infofn(fn func() string) {
|
||||
if shallLog(InfoLevel) {
|
||||
writeInfo(fn())
|
||||
}
|
||||
}
|
||||
|
||||
// Infow writes msg along with fields into the access log.
|
||||
func Infow(msg string, fields ...LogField) {
|
||||
if shallLog(InfoLevel) {
|
||||
|
||||
Reference in New Issue
Block a user