1 Star 0 Fork 1

GO精选开源项目/gorose

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
logger_interface.go 931 Bytes
一键复制 编辑 原始数据 按行查看 历史
fizzday 提交于 2021-03-13 12:41 . page and logger dev
package gorose
import (
"time"
"io"
)
// ILogger ...
type ILogger interface {
Sql(sqlStr string, runtime time.Duration)
Slow(sqlStr string, runtime time.Duration)
Error(msg string)
EnableSqlLog() bool
EnableErrorLog() bool
EnableSlowLog() float64
}
// 暂时规划
type ilogger interface {
// Persist 持久化
Persist(w io.Writer)
// Info 常规日志
Info(args ...string)
// Error 错误日志
Error(args ...string)
// Debug 调试日志
Debug(args ...string)
Infof(format string, args ...string)
Errorf(format string, args ...string)
Debugf(format string, args ...string)
InfoWithCtx(ctx interface{}, args ...string)
ErrorWithCtx(ctx interface{}, args ...string)
DebugWithCtx(ctx interface{}, args ...string)
InfofWithCtxf(ctx interface{}, format string, args ...string)
ErrorfWithCtxf(ctx interface{}, format string, args ...string)
DebugfWithCtxf(ctx interface{}, format string, args ...string)
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/gochina/gorose.git
git@gitee.com:gochina/gorose.git
gochina
gorose
gorose
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385