Documentation ¶
Index ¶
Constants ¶
View Source
const ( ErrorTemplate = "\033[1;31m%s\033[0m" WarnTemplate = "\033[1;33m%s\033[0m" InfoTemplate = "\033[1;32m%s\033[0m" DebugTemplate = "\033[1;34m%s\033[0m" TraceTemplate = "\033[1;35m%s\033[0m" )
View Source
const ( NoLog = iota Error Warn Info Debug Trace )
Variables ¶
This section is empty.
Functions ¶
func Configure ¶
func Configure(config LoggersConfig)
func RegistAppender ¶
func RegistAppender(typeName string, appenderCreatCb func(LogAppenderConfig) *LoggerAppender)
Types ¶
type ConsoleAppender ¶
type ConsoleAppender struct { }
func (*ConsoleAppender) Append ¶
func (c *ConsoleAppender) Append(logEvent LogEvent)
func (*ConsoleAppender) GetName ¶
func (c *ConsoleAppender) GetName() string
type FileAppender ¶
type FileAppender struct {
// contains filtered or unexported fields
}
func (*FileAppender) Append ¶
func (f *FileAppender) Append(logEvent LogEvent)
func (*FileAppender) GetName ¶
func (f *FileAppender) GetName() string
type LogAppenderConfig ¶
type LoggerAppender ¶
type LoggersConfig ¶
type LoggersConfig struct { Appenders map[string]LogAppenderConfig `json:"appenders"` Categories map[string]LogConfig `json:"categories"` }
Click to show internal directories.
Click to hide internal directories.