Versions in this module Expand all Collapse all v0 v0.3.3 Jan 4, 2016 Changes in this version + const CriticalLvl + const CriticalStr + const DateDefaultFormat + const DebugLvl + const DebugStr + const DefaultSubjectPhrase + const ErrorLvl + const ErrorStr + const FormatterSymbol + const InfoLvl + const InfoStr + const MaxQueueSize + const Off + const OffStr + const TimeFormat + const TraceLvl + const TraceStr + const WarnLvl + const WarnStr + var DefaultFormatter *formatter + var DefaultMsgFormat = "%Ns [%Level] %Msg%n" + func Critical(v ...interface{}) error + func Criticalf(format string, params ...interface{}) error + func Debug(v ...interface{}) + func Debugf(format string, params ...interface{}) + func Error(v ...interface{}) error + func Errorf(format string, params ...interface{}) error + func Flush() + func FormatterFunction(message string, level LogLevel, context LogContextInterface) interface + func FormatterFunctionShort(message string, level LogLevel, context LogContextInterface) interface + func Info(v ...interface{}) + func Infof(format string, params ...interface{}) + func NewAsyncAdaptiveLogger(config *logConfig, minInterval time.Duration, maxInterval time.Duration, ...) (*asyncAdaptiveLogger, error) + func NewAsyncLoopLogger(config *logConfig) *asyncLoopLogger + func NewAsyncTimerLogger(config *logConfig, interval time.Duration) (*asyncTimerLogger, error) + func NewBufferedWriter(innerWriter io.Writer, bufferSize int, flushPeriod time.Duration) (*bufferedWriter, error) + func NewConnWriter(netName string, addr string, reconnectOnMsg bool) *connWriter + func NewConsoleWriter() (writer *consoleWriter, err error) + func NewCustomReceiverDispatcher(formatter *formatter, customReceiverName string, cArgs CustomReceiverInitArgs) (*customReceiverDispatcher, error) + func NewCustomReceiverDispatcherByValue(formatter *formatter, customReceiver CustomReceiver, name string, ...) (*customReceiverDispatcher, error) + func NewFileWriter(fileName string) (writer *fileWriter, err error) + func NewFilterDispatcher(formatter *formatter, receivers []interface{}, allowList ...LogLevel) (*filterDispatcher, error) + func NewFormattedWriter(writer io.Writer, formatter *formatter) (*formattedWriter, error) + func NewFormatter(formatString string) (*formatter, error) + func NewListConstraints(allowList []LogLevel) (*listConstraints, error) + func NewLoggerConfig(c logLevelConstraints, e []*LogLevelException, d dispatcherInterface) *logConfig + func NewMinMaxConstraints(min LogLevel, max LogLevel) (*minMaxConstraints, error) + func NewOffConstraints() (*offConstraints, error) + func NewRollingFileWriterSize(fpath string, atype rollingArchiveType, apath string, maxSize int64, ...) (*rollingFileWriterSize, error) + func NewRollingFileWriterTime(fpath string, atype rollingArchiveType, apath string, maxr int, ...) (*rollingFileWriterTime, error) + func NewSMTPWriter(sa, sn string, ras []string, hn, hp, un, pwd string, cacdps []string, ...) *smtpWriter + func NewSplitDispatcher(formatter *formatter, receivers []interface{}) (*splitDispatcher, error) + func NewSyncLogger(config *logConfig) *syncLogger + func RegisterCustomFormatter(name string, creator FormatterFuncCreator) error + func RegisterReceiver(name string, receiver CustomReceiver) + func ReplaceLogger(logger LoggerInterface) error + func Trace(v ...interface{}) + func Tracef(format string, params ...interface{}) + func UseLogger(logger LoggerInterface) error + func Warn(v ...interface{}) error + func Warnf(format string, params ...interface{}) error + type CfgParseParams struct + CustomReceiverProducers map[string]CustomReceiverProducer + func (cfg *CfgParseParams) String() string + type CustomReceiver interface + AfterParse func(initArgs CustomReceiverInitArgs) error + Close func() error + Flush func() + ReceiveMessage func(message string, level LogLevel, context LogContextInterface) error + type CustomReceiverInitArgs struct + XmlCustomAttrs map[string]string + type CustomReceiverProducer func(CustomReceiverInitArgs) (CustomReceiver, error) + type FormatterFunc func(message string, level LogLevel, context LogContextInterface) interface + type FormatterFuncCreator func(param string) FormatterFunc + type LogContextInterface interface + CallTime func() time.Time + CustomContext func() interface{} + FileName func() string + FullPath func() string + Func func() string + IsValid func() bool + Line func() int + ShortPath func() string + type LogLevel uint8 + func LogLevelFromString(levelStr string) (level LogLevel, found bool) + func (level LogLevel) String() string + type LogLevelException struct + func NewLogLevelException(funcPattern string, filePattern string, constraints logLevelConstraints) (*LogLevelException, error) + func (logLevelEx *LogLevelException) FilePattern() string + func (logLevelEx *LogLevelException) FuncPattern() string + func (logLevelEx *LogLevelException) IsAllowed(level LogLevel) bool + func (logLevelEx *LogLevelException) MatchesContext(context LogContextInterface) bool + func (logLevelEx *LogLevelException) String() string + type LoggerInterface interface + Close func() + Closed func() bool + Critical func(v ...interface{}) error + Criticalf func(format string, params ...interface{}) error + Debug func(v ...interface{}) + Debugf func(format string, params ...interface{}) + Error func(v ...interface{}) error + Errorf func(format string, params ...interface{}) error + Flush func() + Info func(v ...interface{}) + Infof func(format string, params ...interface{}) + SetAdditionalStackDepth func(depth int) error + SetContext func(context interface{}) + Trace func(v ...interface{}) + Tracef func(format string, params ...interface{}) + Warn func(v ...interface{}) error + Warnf func(format string, params ...interface{}) error + var Current LoggerInterface + var Default LoggerInterface + var Disabled LoggerInterface + func LoggerFromConfigAsBytes(data []byte) (LoggerInterface, error) + func LoggerFromConfigAsFile(fileName string) (LoggerInterface, error) + func LoggerFromConfigAsString(data string) (LoggerInterface, error) + func LoggerFromCustomReceiver(receiver CustomReceiver) (LoggerInterface, error) + func LoggerFromParamConfigAsBytes(data []byte, parserParams *CfgParseParams) (LoggerInterface, error) + func LoggerFromParamConfigAsFile(fileName string, parserParams *CfgParseParams) (LoggerInterface, error) + func LoggerFromParamConfigAsString(data string, parserParams *CfgParseParams) (LoggerInterface, error) + func LoggerFromWriterWithMinLevel(output io.Writer, minLevel LogLevel) (LoggerInterface, error) + func LoggerFromWriterWithMinLevelAndFormat(output io.Writer, minLevel LogLevel, format string) (LoggerInterface, error) + func LoggerFromXMLDecoder(xmlParser *xml.Decoder, rootNode xml.Token) (LoggerInterface, error)