Try to abstract the main part.

This commit is contained in:
zicla
2019-04-27 23:24:09 +08:00
parent 14b6a74666
commit 2732b14eae
14 changed files with 130 additions and 105 deletions

17
code/tool/inter/logger.go Normal file
View File

@ -0,0 +1,17 @@
package inter
//日志系统必须高保
//全局唯一的日志对象(在main函数中初始化)
var LOGGER Logger
type Logger interface {
//处理日志的统一方法。
Log(prefix string, format string, v ...interface{})
//不同级别的日志处理
Debug(format string, v ...interface{})
Info(format string, v ...interface{})
Warn(format string, v ...interface{})
Error(format string, v ...interface{})
Panic(format string, v ...interface{})
}