Documentation ¶
Overview ¶
Package gtbox_log Log工具
Index ¶
- func GetLogFilePath() string
- func GetProjectName() 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, enableSaveLogFile bool, log_dir string, ...)
- type GTLog
- type GTLogSaveType
- type GTLogStyle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLogFilePath ¶ added in v0.1.43
func GetLogFilePath() string
func GetProjectName ¶ added in v0.1.43
func GetProjectName() string
func SetupLogTools ¶ added in v0.0.19
func SetupLogTools(productName string, enableSaveLogFile bool, log_dir string, settingLogLeve GTLogStyle, logMaxSaveDays int64, logSaveType GTLogSaveType)
SetupLogTools 初始化日志
Types ¶
type GTLog ¶
type GTLog struct { EnableSaveLogFile bool ProjectName string LogLevel GTLogStyle LogSaveMaxDays int64 LogSaveFlag GTLogSaveType // contains filtered or unexported fields }
type GTLogSaveType ¶
type GTLogSaveType int
GTLogSaveType 日志分片类型
const ( GTLogSaveTypeDays GTLogSaveType = iota //按日分片 GTLogSaveHours //按小时分片 )
func (GTLogSaveType) String ¶
func (aFlag GTLogSaveType) String() string
type GTLogStyle ¶ added in v0.0.52
type GTLogStyle int
GTLogStyle 日志样式
const ( GTLogStyleDebug GTLogStyle = iota // Debug GTLogStyleError // Error GTLogStyleWarning // Warning GTLogStyleInfo // Info GTLogStyleTrace // Trace GTLogStyleFatal // Fatal )
func GetLogLevel ¶ added in v0.1.43
func GetLogLevel() GTLogStyle
func (GTLogStyle) String ¶ added in v0.0.52
func (aStyle GTLogStyle) String() string
Click to show internal directories.
Click to hide internal directories.