Documentation ¶
Index ¶
- Constants
- Variables
- func BytesToString(b []byte) string
- func Dbg(format string, args ...interface{})
- func DbgMode(mode int, format string, args ...interface{})
- func DbgModeRaw(addMode int, format string, args ...interface{})
- func DbgRaw(format string, args ...interface{})
- func Enable(v bool)
- func EnableQueue(enable bool, max int)
- func GetQueueString() (bool, string)
- func IsEnableQueue() bool
- func SetDayMultiLog(v bool)
- func SetDefaultMode(mode int)
- func SetFormat(format string)
- func SetHook(f func(data []byte) bool)
- func SetLogFile(filepath string, filename string, prefix string)
- func SetLogFileSize(size int)
- func SetLogFlags(flags int)
- func SetLogPathDepth(level int)
- func SetLogReset()
- func SetLogRollback(v bool)
- func SetMaxLog(count int)
- func StringToBytes(s string) []byte
- func Wait(ms int)
- type Debug
- func (me *Debug) Dbg(format string, args ...interface{})
- func (me *Debug) DbgMode(mode int, format string, args ...interface{})
- func (me *Debug) DbgRaw(mode int, format string, args ...interface{})
- func (me *Debug) GetLogString() (bool, string)
- func (me *Debug) SetDefaultMode(mode int)
- func (me *Debug) SetEnableQueue(enable bool, max int)
- func (me *Debug) SetLogFile(filepath string, filename string, prefix string)
- func (me *Debug) Wait(ms int)
- type LogFile
- func (me *LogFile) CheckLogFile()
- func (me *LogFile) GetFilename() (string, string)
- func (me *LogFile) Log(debugInfo, format string, args ...interface{})
- func (me *LogFile) SetDayMulti(v bool)
- func (me *LogFile) SetFilePath(filepath string, filename string, prefix string)
- func (me *LogFile) SetMaxFilesize(s int)
- func (me *LogFile) SetMaxLog(days int)
- func (me *LogFile) SetReset(v bool)
- func (me *LogFile) SetRollbackMode(v bool)
- func (me *LogFile) Start()
- type LogStringSlice
- type Queue
Constants ¶
View Source
const ( ColorRed = 91 ColorGreen = 92 ColorYellow = 93 ColorRedBack = 41 ColorGreenBack = 42 ColorYellowBack = 43 )
View Source
const ( CSDefault = 0 CSConsole = 0x1 CSLog = 0x2 CSInfo = 0x04 CSError = 0x08 CSWarning = 0x10 CSAll = 0xFFFF )
Variables ¶
View Source
var LogFileDir = "log"
Functions ¶
func BytesToString ¶
func DbgModeRaw ¶
func EnableQueue ¶
func GetQueueString ¶
func IsEnableQueue ¶
func IsEnableQueue() bool
func SetDayMultiLog ¶
func SetDayMultiLog(v bool)
func SetDefaultMode ¶
func SetDefaultMode(mode int)
func SetFormat ¶
func SetFormat(format string)
SetFormat L: line C: function name P: package name F: full Filename f: short filename "P.C:F:L>"
func SetLogFile ¶
func SetLogFileSize ¶
func SetLogFileSize(size int)
func SetLogFlags ¶
func SetLogFlags(flags int)
func SetLogPathDepth ¶
func SetLogPathDepth(level int)
func SetLogReset ¶
func SetLogReset()
func SetLogRollback ¶
func SetLogRollback(v bool)
func StringToBytes ¶
Types ¶
type Debug ¶
type Debug struct { LogFile *LogFile // contains filtered or unexported fields }
func (*Debug) GetLogString ¶
func (*Debug) SetDefaultMode ¶
func (*Debug) SetEnableQueue ¶
func (*Debug) SetLogFile ¶
type LogFile ¶
type LogFile struct {
// contains filtered or unexported fields
}
var Log *LogFile
func CreateLogFile ¶
func (*LogFile) CheckLogFile ¶
func (me *LogFile) CheckLogFile()
func (*LogFile) GetFilename ¶
func (*LogFile) SetDayMulti ¶
func (*LogFile) SetFilePath ¶
func (*LogFile) SetMaxFilesize ¶
func (*LogFile) SetRollbackMode ¶
type LogStringSlice ¶
type LogStringSlice []string
func (LogStringSlice) Len ¶
func (c LogStringSlice) Len() int
func (LogStringSlice) Less ¶
func (c LogStringSlice) Less(i, j int) bool
func (LogStringSlice) Swap ¶
func (c LogStringSlice) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.