1 Star 0 Fork 0

jmesyan/impetus

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
log.go 1.33 KB
一键复制 编辑 原始数据 按行查看 历史
jmesyan 提交于 2020-12-12 22:03 . init
package log
import (
beegolog "gitee.com/jmesyan/impetus/log/beego"
"sync"
)
var beego *beegolog.BeeLogger
var once sync.Once
func LogBeego() *beegolog.BeeLogger {
once.Do(func() {
beego = beegolog.NewLogger()
})
return beego
}
// Emergency logs a message at emergency level.
func Emergency(f interface{}, v ...interface{}) {
LogBeego().Emergency(beegolog.FormatLog(f, v...))
}
// Alert logs a message at alert level.
func Alert(f interface{}, v ...interface{}) {
LogBeego().Alert(beegolog.FormatLog(f, v...))
}
// Critical logs a message at critical level.
func Critical(f interface{}, v ...interface{}) {
LogBeego().Critical(beegolog.FormatLog(f, v...))
}
// Error logs a message at error level.
func Error(f interface{}, v ...interface{}) {
LogBeego().Error(beegolog.FormatLog(f, v...))
}
// Warning logs a message at warning level.
func Warning(f interface{}, v ...interface{}) {
LogBeego().Warn(beegolog.FormatLog(f, v...))
}
// Notice logs a message at notice level.
func Notice(f interface{}, v ...interface{}) {
LogBeego().Notice(beegolog.FormatLog(f, v...))
}
// Info compatibility alias for Warning()
func Info(f interface{}, v ...interface{}) {
LogBeego().Info(beegolog.FormatLog(f, v...))
}
// Debug logs a message at debug level.
func Debug(f interface{}, v ...interface{}) {
LogBeego().Debug(beegolog.FormatLog(f, v...))
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/jmesyan/impetus.git
git@gitee.com:jmesyan/impetus.git
jmesyan
impetus
impetus
v1.0.8

搜索帮助