1 Star 0 Fork 0

cube-lab/tcb-openapi

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
context.go 460 Bytes
Copy Edit Raw Blame History
evansleiliu authored 2021-04-08 08:12 . 1.调整包
package context
import (
"gitee.com/cubelab/tcb-openapi/config"
"github.com/sirupsen/logrus"
)
//上下文
type Context struct {
Config *config.Config
Logger *logrus.Logger
}
/*
SetLogger 日志记录 默认输出到 os.Stdout
可以新建 logger 输出到指定文件
如果不想开启日志,可以输出到 /dev/null log.SetOutput(ioutil.Discard)
*/
func (c *Context) SetLogger(logger *logrus.Logger) {
if logger != nil {
c.Logger = logger
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/cubelab/tcb-openapi.git
git@gitee.com:cubelab/tcb-openapi.git
cubelab
tcb-openapi
tcb-openapi
41edef41dc45

Search