Documentation ¶
Index ¶
- Variables
- func GTGetLogsDir() string
- func LogDebugf(format string, args ...interface{})
- func LogErrorf(format string, args ...interface{})
- func LogFatalf(format string, args ...interface{})
- func LogInfof(format string, args ...interface{})
- func LogTracef(format string, args ...interface{})
- func LogWarnf(format string, args ...interface{})
- func SetupLogTools(productName string, debugToCut bool, settingLogLeve logrus.Level, ...)
- type GTLog
- func (aLog *GTLog) Debugf(format string, args ...interface{})
- func (aLog *GTLog) Errorf(format string, args ...interface{})
- func (aLog *GTLog) Fatalf(format string, args ...interface{})
- func (aLog *GTLog) Ininfof(format string, args ...interface{})
- func (alog *GTLog) Setup()
- func (aLog *GTLog) Tracef(format string, args ...interface{})
- func (aLog *GTLog) Warnf(format string, args ...interface{})
- type GTLogSaveType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ALog *GTLog GTLogOnce sync.Once ProjectName = "test" LogLevel = logrus.DebugLevel LogSaveMaxDays int64 LogSaveFlag = GTLogSaveTypeDays LogPath = "./logs/run" LogDebugToCut = false //debug模式下是否开启日志分割 默认false方便IDE调试 )
Functions ¶
func SetupLogTools ¶ added in v0.0.19
Types ¶
type GTLogSaveType ¶
type GTLogSaveType int
GTLogSaveType 日志分片类型
const ( GTLogSaveTypeDays GTLogSaveType = iota //按日分片 GTLogSaveHours //按小时分片 )
func (GTLogSaveType) String ¶
func (aFlag GTLogSaveType) String() string
Click to show internal directories.
Click to hide internal directories.