Documentation ¶
Index ¶
Constants ¶
View Source
const DayLevel = "day"
View Source
const DebugLevel = "debug"
debug
View Source
const ErrorLevel = "error"
error
View Source
const InfoLevel = "info"
info
View Source
const MonthsLevel = "months"
View Source
const WarnLevel = "warn"
warn
View Source
const YearLevel = "Year"
Variables ¶
View Source
var LogConsoleLevel = "debug"
控制台输出等级
View Source
var LogDebugColor = "cyan"
debug 颜色
View Source
var LogDebugFile = "debug.log"
debug 存储文件名称
View Source
var LogErrorColor = "red"
error 颜色
View Source
var LogErrorFile = "error.log"
error 存储文件名称
View Source
var LogInfoColor = "blue"
info 颜色
View Source
var LogInfoFile = "info.log"
info 存储文件名称
View Source
var LogIsSave = true
是否保存日志
View Source
var LogMsgNum = 1024
日志数量
View Source
var LogSaveCutMax = 30
日志最长保存时间
View Source
var LogSaveCutTime = "day"
保存分段 (年,月,日)
View Source
var LogSaveIsCut = true
保存分段 (年,月,日)
View Source
var LogSavePath = "logs"
日志存储地址
View Source
var LogTimeFormat = "2001-05-16 15:04:05 500"
是否保存日志
View Source
var LogWarnColor = "yellow"
warn 颜色
View Source
var LogWarnFile = "warn.log"
warn 存储文件名称
Functions ¶
func CreateLogMsg ¶
Types ¶
type LogStart ¶
type LogStart struct { IsSave bool `autoInjectCfg:"octopus.log.save.is"` SavePath string `autoInjectCfg:"octopus.log.save.path"` SaveIsCut bool `autoInjectCfg:"octopus.log.save.cut.is"` SaveCutTime string `autoInjectCfg:"octopus.log.save.cut.time"` SaveCutMax int `autoInjectCfg:"octopus.log.save.cut.max"` ConsoleLevel string `autoInjectCfg:"octopus.log.console.level"` TimeFormat string `autoInjectCfg:"octopus.log.time.format"` MsgNum int `autoInjectCfg:"octopus.log.msg.num"` DebugColor string `autoInjectCfg:"octopus.log.debug.color"` DebugFile string `autoInjectCfg:"octopus.log.debug.file"` InfoColor string `autoInjectCfg:"octopus.log.info.color"` InfoFile string `autoInjectCfg:"octopus.log.info.file"` WarnColor string `autoInjectCfg:"octopus.log.warn.color"` WarnFile string `autoInjectCfg:"octopus.log.warn.file"` ErrorColor string `autoInjectCfg:"octopus.log.error.color"` ErrorFile string `autoInjectCfg:"octopus.log.error.file"` }
Log启动方法
type OctopusLog ¶
type OctopusLog struct {
LogMsgChan chan *LogMsg
}
Click to show internal directories.
Click to hide internal directories.