Documentation ¶
Index ¶
- Variables
- func Debug(v ...interface{})
- func DebugF(format string, v ...interface{})
- func Error(v ...interface{})
- func ErrorF(format string, v ...interface{})
- func Fatal(v ...interface{})
- func FatalF(format string, v ...interface{})
- func Force(v ...interface{})
- func ForceF(format string, v ...interface{})
- func Info(v ...interface{})
- func InfoF(format string, v ...interface{})
- func SetCurrentLevel(level Level)
- func SetLogMode(mode OutputMode)
- func Warn(v ...interface{})
- func WarnF(format string, v ...interface{})
- type GLogger
- func (gLogger *GLogger) Debug(v ...interface{})
- func (gLogger *GLogger) DebugF(format string, v ...interface{})
- func (gLogger *GLogger) Error(v ...interface{})
- func (gLogger *GLogger) ErrorF(format string, v ...interface{})
- func (gLogger *GLogger) Fatal(v ...interface{})
- func (gLogger *GLogger) FatalF(format string, v ...interface{})
- func (gLogger *GLogger) Force(v ...interface{})
- func (gLogger *GLogger) ForceF(format string, v ...interface{})
- func (gLogger *GLogger) Info(v ...interface{})
- func (gLogger *GLogger) InfoF(format string, v ...interface{})
- func (gLogger *GLogger) SetCallerDepth(depth int)
- func (gLogger *GLogger) SetCurrentLevel(level Level)
- func (gLogger *GLogger) SetLogMode(mode OutputMode)
- func (gLogger *GLogger) Warn(v ...interface{})
- func (gLogger *GLogger) WarnF(format string, v ...interface{})
- type Level
- type OutputMode
Constants ¶
This section is empty.
Variables ¶
View Source
var ( LogSavePath = "logs/" LogSaveName = "log" LogFileExt = "log" TimeFormat = "20060102" CurrentDate = time.Now().Format(TimeFormat) )
參數設定
Functions ¶
func SetCurrentLevel ¶
func SetCurrentLevel(level Level)
SetCurrentLevel 設置目前層級 DEBUG < INFO < WARNING < ERROR < FATAL EX : 設置 INFO,DEBUG就不會印出
func SetLogMode ¶
func SetLogMode(mode OutputMode)
Types ¶
type GLogger ¶ added in v0.0.3
type GLogger struct { RWLock *sync.RWMutex File *os.File // contains filtered or unexported fields }
func (*GLogger) Force ¶ added in v0.0.9
func (gLogger *GLogger) Force(v ...interface{})
Force 不管層級一定要印出
func (*GLogger) SetCallerDepth ¶ added in v0.0.7
FatalF 致命層級
func (*GLogger) SetCurrentLevel ¶ added in v0.0.3
SetCurrentLevel 設置目前層級 DEBUG < INFO < WARNING < ERROR < FATAL EX : 設置 INFO,DEBUG就不會印出
func (*GLogger) SetLogMode ¶ added in v0.0.3
func (gLogger *GLogger) SetLogMode(mode OutputMode)
SetLogMode 設置Log模式
Click to show internal directories.
Click to hide internal directories.