Versions in this module Expand all Collapse all v1 v1.1.0 Mar 16, 2022 Changes in this version + const DefaultFileGCInterval type FileConfig + GCInterval int + RetainDay int v1.0.0 Mar 8, 2016 Changes in this version + const DefaultConsoleTimeTmpl + const DefaultConsoleTmpl + const DefaultElasticIndexTmpl + const DefaultElasticTypeTmpl + const DefaultElasticURL + const DefaultEnabled + const DefaultFileCaller + const DefaultFileNameTmpl + const DefaultFilePath + const DefaultFileSize + const DefaultInterval + const DefaultLogLevel + const DefaultMongoCollectionTmpl + const DefaultMongoDBTmpl + const DefaultMongoURL + const DefaultMsgTmpl + const DefaultPrint + const DefaultShowFile + const DefaultSystemTag + const DefaultSystemTmpl + const DefaultTag + const DefaultTimeTmpl + func GetDateData(v time.Time) map[string]interface + func GetTimeData(data time.Time) map[string]interface + func ParseLogItem(tmpl interface{}, timeTmpl interface{}, data *LogItem) string + func ParseLogItemToBuffer(tmpl interface{}, timeTmpl interface{}, data *LogItem) *bytes.Buffer + func ParseName(tmpl interface{}, data *LogItem) string + func ParseTime(tmpl interface{}, data time.Time) string + type BufferConfig struct + Engine LogBufferEngine + TargetStore string + type ConsoleConfig struct + Item LogItemConfig + Level LogLevel + type CustomConfig struct + IsPrint int + TargetStore string + type ElasticConfig struct + IndexTmpl string + TypeTmpl string + URL string + type FileConfig struct + FileNameTmpl string + FilePath string + FileSize int64 + Item LogItemConfig + type GlobalConfig struct + Buffer BufferConfig + FileCaller int + Interval int + IsEnabled int + IsPrint int + Level LogLevel + Rule LogRule + ShowFile int + TargetStore string + type LevelConfig struct + Config CustomConfig + Values []LogLevel + type LogBuffer interface + Pop func() (*LogItem, error) + Push func(LogItem) error + type LogBufferEngine byte + const MEMORY_BUFFER + const REDIS_BUFFER + type LogConfig struct + Console ConsoleConfig + Global GlobalConfig + Levels []LevelConfig + Store StoreConfig + Tags []TagConfig + type LogFile struct + FuncName string + Line int + Name string + ShortName string + type LogItem struct + File LogFile + ID uint64 + Level LogLevel + Message string + Tag LogTag + Time time.Time + func (lt *LogItem) ToMap() map[string]interface{} + type LogItemConfig struct + TimeTmpl string + Tmpl string + type LogLevel byte + const DEBUG + const ERROR + const FATAL + const INFO + const WARN + func (l LogLevel) ToString() string + type LogManage interface + Console func(level LogLevel, tag LogTag, v ...interface{}) + Consolef func(level LogLevel, tag LogTag, format string, v ...interface{}) + TotalNum func() int64 + Write func(level LogLevel, tag LogTag, v ...interface{}) + Writef func(level LogLevel, tag LogTag, format string, v ...interface{}) + type LogRule byte + const AlwaysRule + const GlobalRule + const LevelRule + const TagRule + type LogStore interface + Store func(*LogItem) error + type LogStoreEngine byte + const FILE_STORE + type LogTag string + type MongoConfig struct + CollectionTmpl string + DBTmpl string + URL string + type RedisConfig struct + Addr string + DB int64 + Network string + PoolSize int + type StoreConfig struct + Elastic map[string]ElasticConfig + File map[string]FileConfig + Mongo map[string]MongoConfig + Redis map[string]RedisConfig + type TagConfig struct + Config CustomConfig + Level LogLevel + Names []LogTag + type TmplKey uint + const TmplConsole + const TmplConsoleTime