Versions in this module Expand all Collapse all v0 v0.1.0 Sep 3, 2019 Changes in this version + const DefaultLayout + const LevelFieldKey + const MessageFieldKey + const TimestampFieldKey + const TimestampFormat + func Bind(logger SlaLogger) + func BrigeWrite(bridge Bridge, p []byte) error + func Install(bridge Bridge) + func NewConsoleWriter(e Encoder, f *LevelFilter) *consoleWriter + func NewFileWriter(opts *FileWriterOption) *fileWriter + func NewJsonEncoder() *jsonEncoder + func NewLiteralConverter(value string) *literalConverter + func NewLogstashEncoder() *logstashEncoder + func NewNoopRollingPolicy() *noopRollingPolicy + func NewPatternCompiler(node *node, converterMap map[string]NewConverter) *patternCompiler + func NewPatternParser(pattern string) *patternParser + func NewSizeAndTimeBasedRollingPolicy(filenamePattern string, maxSize string) *sizeAndTimeBasedRollingPolicy + func NewSocketWriter(u *url.URL) *socketWriter + func NewTimeBasedRollingPolicy(filenamePattern string) *timeBasedRollingPolicy + func Report(msg string) + func Reportf(format string, args ...interface{}) + type Bridge interface + Name func() string + ParseLevel func(lvl string) Level + type Converter interface + AttachChild func(child Converter) + AttachOptions func(opts []string) + AttatchNext func(next Converter) + Convert func(event interface{}) string + Next func() Converter + type Encoder interface + Encode func(p []byte) (data []byte, err error) + type FileWriterOption struct + Encoder Encoder + Filename string + Filter *LevelFilter + RollingPolicy RollingPolicy + type Filter interface + Do func() bool + type Level int8 + const DebugLevel + const ErrorLevel + const FatalLevel + const InfoLevel + const PanicLevel + const TraceLevel + const WarnLevel + func ParseLevel(lvl string) Level + func (l Level) String() string + type LevelFilter struct + func NewLevelFilter(lvl Level) *LevelFilter + func (f *LevelFilter) Do(level Level) bool + type MultiWriter struct + func NewMultiWriter() *MultiWriter + func (mw *MultiWriter) AddWriter(w ...Writer) + func (mw *MultiWriter) Write(p []byte) (n int, err error) + type NewConverter func() Converter + type PatternEncoder struct + func NewPatternEncoder(layout string) *PatternEncoder + func (pe *PatternEncoder) Encode(p []byte) (data []byte, err error) + type Record interface + Bool func(key string, val bool) Record + Bools func(key string, val []bool) Record + Bytes func(key string, val []byte) Record + Dur func(key string, val time.Duration) Record + Durs func(key string, val []time.Duration) Record + Err func(err error) Record + Errs func(key string, errs []error) Record + Float32 func(key string, val float32) Record + Float64 func(key string, val float64) Record + Floats32 func(key string, val []float32) Record + Floats64 func(key string, val []float64) Record + Hex func(key string, val []byte) Record + Int func(key string, val int) Record + Int16 func(key string, val int16) Record + Int32 func(key string, val int32) Record + Int64 func(key string, val int64) Record + Int8 func(key string, val int8) Record + Interface func(key string, val interface{}) Record + Ints func(key string, val []int) Record + Ints16 func(key string, val []int16) Record + Ints32 func(key string, val []int32) Record + Ints64 func(key string, val []int64) Record + Ints8 func(key string, val []int8) Record + Msg func(msg string) + Msgf func(format string, msg string) + Str func(key, val string) Record + Strs func(key string, val []string) Record + Time func(key string, val time.Time) Record + Times func(key string, val []time.Time) Record + Uint func(key string, val uint) Record + Uint16 func(key string, val uint16) Record + Uint32 func(key string, val uint32) Record + Uint64 func(key string, val uint64) Record + Uint8 func(key string, val uint8) Record + Uints func(key string, val []uint) Record + Uints16 func(key string, val []uint16) Record + Uints32 func(key string, val []uint32) Record + Uints64 func(key string, val []uint64) Record + Uints8 func(key string, val []uint8) Record + type RollingPolicy interface + Attach func(w *fileWriter) + Prepare func() error + Rotate func() error + ShouldTrigger func(fileSize int64) bool + type SlaLogger interface + AddWriter func(w ...Writer) + Debug func() Record + Error func() Record + Fatal func() Record + Info func() Record + Level func(lvl Level) Record + Name func() string + Panic func() Record + Print func(args ...interface{}) + Printf func(format string, args ...interface{}) + SetLevel func(lvl Level) + Trace func() Record + Warn func() Record + WriteRaw func(p []byte) + func Logger() SlaLogger + type SocketReader struct + func NewSocketReader() *SocketReader + func (sr *SocketReader) Start() + func (sr *SocketReader) Stop() + type Writer interface + Encoder func() Encoder + Filter func() *LevelFilter Other modules containing this package gitlab.com/anbillon/slago