Documentation ¶
Index ¶
- Variables
- func BaseName(p string) string
- func Debug(v ...interface{})
- func Debugf(format string, v ...interface{})
- func Error(v ...interface{})
- func Errorf(format string, v ...interface{})
- func GetSelfFileDir() string
- func GetSelfFileName() string
- func Infor(v ...interface{})
- func Inforf(format string, v ...interface{})
- func InitLogTools(logconfigFile string) func()
- func IsExist(p string) bool
- func LogBytes(writelevel LOGLEVEL, b []byte) (n int, err error)
- func LogString(writelevel LOGLEVEL, s string)
- func Panic(v ...interface{})
- func SingletonProcess(mutexName string) func()
- func Warning(v ...interface{})
- func Warningf(format string, v ...interface{})
- type LOGLEVEL
- type LogTools
Constants ¶
This section is empty.
Variables ¶
View Source
var LogToolsDefault = new(LogTools)
Functions ¶
func InitLogTools ¶
func InitLogTools(logconfigFile string) func()
InitLogger 初始化 log,返回关闭log的函数 调用示例:defer myutil.InitLogTools("xxx.ini")() 配置文件示例: [Log] LogFileDirctory=C:\LOG\LogDir LogLevel=DEBUG StdOut=1
func SingletonProcess ¶
func SingletonProcess(mutexName string) func()
单进程模式,建议在main函数第一行调用 调用示例: defer SingletonProcess("mutex name")()
Types ¶
Click to show internal directories.
Click to hide internal directories.