Documentation
¶
Index ¶
- Constants
- Variables
- func Refresh(fileName string) error
- func RefreshBuffer(buffer string, ext string) error
- func RefreshReader(input io.Reader, ext string) error
- func RegisterConverter(fn util.Converter)
- func RegisterPlugin(name string, typ string, i interface{})
- func RegisterReader(r Reader, ext ...string)
- type AcceptAllFilter
- type Appender
- type AppenderRef
- type ArrayValue
- type BaseAppender
- type BoolValue
- type BoolsValue
- type ColorStyle
- type CompositeFilter
- type ConsoleAppender
- type DenyAllFilter
- type Encoder
- type Entry
- func (e *Entry) Debug(args ...interface{}) *Event
- func (e *Entry) Debugf(format string, args ...interface{}) *Event
- func (e *Entry) Debugw(fields ...Field) *Event
- func (e *Entry) Error(args ...interface{}) *Event
- func (e *Entry) Errorf(format string, args ...interface{}) *Event
- func (e *Entry) Errorw(fields ...Field) *Event
- func (e *Entry) Fatal(args ...interface{}) *Event
- func (e *Entry) Fatalf(format string, args ...interface{}) *Event
- func (e *Entry) Fatalw(fields ...Field) *Event
- func (e *Entry) Info(args ...interface{}) *Event
- func (e *Entry) Infof(format string, args ...interface{}) *Event
- func (e *Entry) Infow(fields ...Field) *Event
- func (e *Entry) Panic(args ...interface{}) *Event
- func (e *Entry) Panicf(format string, args ...interface{}) *Event
- func (e *Entry) Panicw(fields ...Field) *Event
- func (e *Entry) Trace(args ...interface{}) *Event
- func (e *Entry) Tracef(format string, args ...interface{}) *Event
- func (e *Entry) Tracew(fields ...Field) *Event
- func (e *Entry) Warn(args ...interface{}) *Event
- func (e *Entry) Warnf(format string, args ...interface{}) *Event
- func (e *Entry) Warnw(fields ...Field) *Event
- func (e *Entry) WithContext(ctx context.Context) *Entry
- func (e *Entry) WithSkip(n int) *Entry
- func (e *Entry) WithTag(tag string) *Entry
- type Event
- type Field
- func Any(key string, value interface{}) Field
- func Array(key string, val ...Value) Field
- func Bool(key string, val bool) Field
- func BoolPtr(key string, val *bool) Field
- func Bools(key string, val []bool) Field
- func Float32(key string, val float32) Field
- func Float32Ptr(key string, val *float32) Field
- func Float32s(key string, val []float32) Field
- func Float64(key string, val float64) Field
- func Float64Ptr(key string, val *float64) Field
- func Float64s(key string, val []float64) Field
- func Int(key string, val int) Field
- func Int16(key string, val int16) Field
- func Int16Ptr(key string, val *int16) Field
- func Int16s(key string, val []int16) Field
- func Int32(key string, val int32) Field
- func Int32Ptr(key string, val *int32) Field
- func Int32s(key string, val []int32) Field
- func Int64(key string, val int64) Field
- func Int64Ptr(key string, val *int64) Field
- func Int64s(key string, val []int64) Field
- func Int8(key string, val int8) Field
- func Int8Ptr(key string, val *int8) Field
- func Int8s(key string, val []int8) Field
- func IntPtr(key string, val *int) Field
- func Ints(key string, val []int) Field
- func Nil(key string) Field
- func Object(key string, fields ...Field) Field
- func Reflect(key string, val interface{}) Field
- func String(key string, val string) Field
- func StringPtr(key string, val *string) Field
- func Strings(key string, val []string) Field
- func Uint(key string, val uint) Field
- func Uint16(key string, val uint16) Field
- func Uint16Ptr(key string, val *uint16) Field
- func Uint16s(key string, val []uint16) Field
- func Uint32(key string, val uint32) Field
- func Uint32Ptr(key string, val *uint32) Field
- func Uint32s(key string, val []uint32) Field
- func Uint64(key string, val uint64) Field
- func Uint64Ptr(key string, val *uint64) Field
- func Uint64s(key string, val []uint64) Field
- func Uint8(key string, val uint8) Field
- func Uint8Ptr(key string, val *uint8) Field
- func Uint8s(key string, val []uint8) Field
- func UintPtr(key string, val *uint) Field
- func Uints(key string, val []uint) Field
- func W(fn func() []Field) Field
- type FileAppender
- type FileWriter
- type Filter
- type FlatEncoder
- func (enc *FlatEncoder) AppendArrayBegin() error
- func (enc *FlatEncoder) AppendArrayEnd() error
- func (enc *FlatEncoder) AppendBool(v bool) error
- func (enc *FlatEncoder) AppendEncoderBegin() error
- func (enc *FlatEncoder) AppendEncoderEnd() error
- func (enc *FlatEncoder) AppendFloat64(v float64) error
- func (enc *FlatEncoder) AppendInt64(v int64) error
- func (enc *FlatEncoder) AppendKey(key string) error
- func (enc *FlatEncoder) AppendObjectBegin() error
- func (enc *FlatEncoder) AppendObjectEnd() error
- func (enc *FlatEncoder) AppendReflect(v interface{}) error
- func (enc *FlatEncoder) AppendString(v string) error
- func (enc *FlatEncoder) AppendUint64(v uint64) error
- type Float32sValue
- type Float64Value
- type Float64sValue
- type FormatFunc
- type Initializer
- type Int16sValue
- type Int32sValue
- type Int64Value
- type Int64sValue
- type Int8sValue
- type IntsValue
- type JSONEncoder
- func (enc *JSONEncoder) AppendArrayBegin() error
- func (enc *JSONEncoder) AppendArrayEnd() error
- func (enc *JSONEncoder) AppendBool(v bool) error
- func (enc *JSONEncoder) AppendEncoderBegin() error
- func (enc *JSONEncoder) AppendEncoderEnd() error
- func (enc *JSONEncoder) AppendFloat64(v float64) error
- func (enc *JSONEncoder) AppendInt64(v int64) error
- func (enc *JSONEncoder) AppendKey(key string) error
- func (enc *JSONEncoder) AppendObjectBegin() error
- func (enc *JSONEncoder) AppendObjectEnd() error
- func (enc *JSONEncoder) AppendReflect(v interface{}) error
- func (enc *JSONEncoder) AppendString(v string) error
- func (enc *JSONEncoder) AppendUint64(u uint64) error
- func (enc *JSONEncoder) Reset()
- type JSONLayout
- type Layout
- type Level
- type LevelFilter
- type LevelMatchFilter
- type LevelRangeFilter
- type LifeCycle
- type Logger
- func (l *Logger) Appenders() []Appender
- func (l *Logger) Debug(args ...interface{}) *Event
- func (l *Logger) Debugf(format string, args ...interface{}) *Event
- func (l *Logger) Debugw(fields ...Field) *Event
- func (l *Logger) Error(args ...interface{}) *Event
- func (l *Logger) Errorf(format string, args ...interface{}) *Event
- func (l *Logger) Errorw(fields ...Field) *Event
- func (l *Logger) Fatal(args ...interface{}) *Event
- func (l *Logger) Fatalf(format string, args ...interface{}) *Event
- func (l *Logger) Fatalw(fields ...Field) *Event
- func (l *Logger) Info(args ...interface{}) *Event
- func (l *Logger) Infof(format string, args ...interface{}) *Event
- func (l *Logger) Infow(fields ...Field) *Event
- func (l *Logger) Level() Level
- func (l *Logger) Name() string
- func (l *Logger) Panic(args ...interface{}) *Event
- func (l *Logger) Panicf(format string, args ...interface{}) *Event
- func (l *Logger) Panicw(fields ...Field) *Event
- func (l *Logger) Trace(args ...interface{}) *Event
- func (l *Logger) Tracef(format string, args ...interface{}) *Event
- func (l *Logger) Tracew(fields ...Field) *Event
- func (l *Logger) Warn(args ...interface{}) *Event
- func (l *Logger) Warnf(format string, args ...interface{}) *Event
- func (l *Logger) Warnw(fields ...Field) *Event
- func (l *Logger) WithContext(ctx context.Context) *Entry
- func (l *Logger) WithSkip(n int) *Entry
- func (l *Logger) WithTag(tag string) *Entry
- type Node
- type NullAppender
- type ObjectValue
- type Operator
- type PatternLayout
- type Plugin
- type PluginTag
- type Reader
- type ReflectValue
- type Result
- type RollingFileAppender
- type StringValue
- type StringsValue
- type T
- type TagFilter
- type TimeFilter
- type Uint16sValue
- type Uint32sValue
- type Uint64Value
- type Uint64sValue
- type Uint8sValue
- type UintsValue
- type Value
- type Writer
- type XMLReader
Constants ¶
const ( NoneLevel = Level(iota) TraceLevel DebugLevel InfoLevel WarnLevel ErrorLevel PanicLevel FatalLevel OffLevel )
const ( PluginTypeAppender = "Appender" PluginTypeFilter = "Filter" PluginTypeLayout = "Layout" )
const ( ResultAccept = Result(iota) ResultDeny )
const ( ColorStyleNone = ColorStyle(iota) ColorStyleNormal ColorStyleBright )
Variables ¶
var Writers = &writers{ writers: make(map[string]*sharedWriter), }
Writers manages the Get and Release of Writer(s).
Functions ¶
func RegisterConverter ¶
RegisterConverter registers Converter for non-primitive type such as time.Time, time.Duration, or other user-defined value type.
func RegisterPlugin ¶
RegisterPlugin registers a Plugin, `i` is used to obtain the type of Plugin.
Types ¶
type AcceptAllFilter ¶
type AcceptAllFilter struct{}
AcceptAllFilter causes all logging events to be accepted.
func (*AcceptAllFilter) Filter ¶
func (f *AcceptAllFilter) Filter(e *Event) Result
type Appender ¶
Appender represents an output destination. Don't provide an asynchronous appender, because we have asynchronous logger.
type AppenderRef ¶
type AppenderRef struct { Ref string `PluginAttribute:"ref"` Filter Filter `PluginElement:"Filter"` Level Level `PluginAttribute:"level,default=none"` // contains filtered or unexported fields }
AppenderRef is a reference to an Appender.
func (*AppenderRef) Append ¶
func (r *AppenderRef) Append(e *Event)
type ArrayValue ¶
type ArrayValue []Value
ArrayValue represents a slice of Value carried by Field.
func (ArrayValue) Encode ¶
func (v ArrayValue) Encode(enc Encoder) error
Encode encodes the data represented by v to an Encoder.
type BaseAppender ¶
type BaseAppender struct { Name string `PluginAttribute:"name"` Layout Layout `PluginElement:"Layout,default=PatternLayout"` }
func (*BaseAppender) GetLayout ¶
func (c *BaseAppender) GetLayout() Layout
func (*BaseAppender) GetName ¶
func (c *BaseAppender) GetName() string
func (*BaseAppender) Start ¶
func (c *BaseAppender) Start() error
func (*BaseAppender) Stop ¶
func (c *BaseAppender) Stop(ctx context.Context)
type BoolsValue ¶
type BoolsValue []bool
BoolsValue represents a slice of bool carried by Field.
func (BoolsValue) Encode ¶
func (v BoolsValue) Encode(enc Encoder) error
Encode encodes the data represented by v to an Encoder.
type ColorStyle ¶
type ColorStyle int
func ParseColorStyle ¶
func ParseColorStyle(s string) (ColorStyle, error)
ParseColorStyle parses `s` to a ColorStyle value.
type CompositeFilter ¶
type CompositeFilter struct { Filters []Filter `PluginElement:"Filter"` Operator Operator //`PluginAttribute:"operator,default=and"` }
func (*CompositeFilter) Filter ¶
func (f *CompositeFilter) Filter(e *Event) Result
func (*CompositeFilter) Start ¶
func (f *CompositeFilter) Start() error
func (*CompositeFilter) Stop ¶
func (f *CompositeFilter) Stop(ctx context.Context)
type ConsoleAppender ¶
type ConsoleAppender struct {
BaseAppender
}
ConsoleAppender is an Appender that writing messages to os.Stdout.
func (*ConsoleAppender) Append ¶
func (c *ConsoleAppender) Append(e *Event)
type DenyAllFilter ¶
type DenyAllFilter struct{}
DenyAllFilter causes all logging events to be dropped.
func (*DenyAllFilter) Filter ¶
func (f *DenyAllFilter) Filter(e *Event) Result
type Encoder ¶
type Encoder interface { AppendEncoderBegin() error AppendEncoderEnd() error AppendObjectBegin() error AppendObjectEnd() error AppendArrayBegin() error AppendArrayEnd() error AppendKey(key string) error AppendBool(v bool) error AppendInt64(v int64) error AppendUint64(v uint64) error AppendFloat64(v float64) error AppendString(v string) error AppendReflect(v interface{}) error }
An Encoder is used to serialize strongly-typed Field.
type Entry ¶
type Entry struct {
// contains filtered or unexported fields
}
Entry is an Entry implementation that has context and errno.
type Event ¶
type Event struct { Context context.Context Level Level Time time.Time File string Line int Tag string Fields []Field Message string }
Event provides contextual information about a log message.
type Field ¶
Field is used to replace printf operation with lower cost.
func Any ¶
Any takes a key and an arbitrary value and chooses the best way to represent them as a field, falling back to a reflection-based approach only if necessary.
func Float32Ptr ¶
Float32Ptr constructs a field that carries a *float32.
func Float64Ptr ¶
Float64Ptr constructs a field that carries a *float64.
func Reflect ¶
Reflect constructs a field that carries an interface{}, which should be serialized using reflection.
type FileAppender ¶
type FileAppender struct { BaseAppender FileName string `PluginAttribute:"fileName"` // contains filtered or unexported fields }
FileAppender is an Appender writing messages to *os.File.
func (*FileAppender) Append ¶
func (c *FileAppender) Append(e *Event)
func (*FileAppender) Start ¶
func (c *FileAppender) Start() error
func (*FileAppender) Stop ¶
func (c *FileAppender) Stop(ctx context.Context)
type FileWriter ¶
type FileWriter struct {
// contains filtered or unexported fields
}
FileWriter is a Writer implementation by *os.File.
func (*FileWriter) Name ¶
func (c *FileWriter) Name() string
func (*FileWriter) Stop ¶
func (c *FileWriter) Stop(ctx context.Context)
type Filter ¶
Filter is an interface that tells the logger a log message should be dropped when the Filter method returns ResultDeny. Filter 只应该出现在两个地方,一个是 Logger 上,用于控制消息是否打印,另一个是 AppenderRef,用于控制消息是否输出到 Appender 上,即控制消息路由。
type FlatEncoder ¶
type FlatEncoder struct {
// contains filtered or unexported fields
}
FlatEncoder encodes Fields in flat format.
func NewFlatEncoder ¶
func NewFlatEncoder(buf *bytes.Buffer, separator string) *FlatEncoder
NewFlatEncoder return a new *FlatEncoder with separator.
func (*FlatEncoder) AppendArrayBegin ¶
func (enc *FlatEncoder) AppendArrayBegin() error
AppendArrayBegin appends an array begin character.
func (*FlatEncoder) AppendArrayEnd ¶
func (enc *FlatEncoder) AppendArrayEnd() error
AppendArrayEnd appends an array end character.
func (*FlatEncoder) AppendBool ¶
func (enc *FlatEncoder) AppendBool(v bool) error
AppendBool appends a bool.
func (*FlatEncoder) AppendEncoderBegin ¶
func (enc *FlatEncoder) AppendEncoderBegin() error
AppendEncoderBegin appends an encoder begin character.
func (*FlatEncoder) AppendEncoderEnd ¶
func (enc *FlatEncoder) AppendEncoderEnd() error
AppendEncoderEnd appends an encoder end character.
func (*FlatEncoder) AppendFloat64 ¶
func (enc *FlatEncoder) AppendFloat64(v float64) error
AppendFloat64 appends a float64.
func (*FlatEncoder) AppendInt64 ¶
func (enc *FlatEncoder) AppendInt64(v int64) error
AppendInt64 appends a int64.
func (*FlatEncoder) AppendKey ¶
func (enc *FlatEncoder) AppendKey(key string) error
AppendKey appends a key.
func (*FlatEncoder) AppendObjectBegin ¶
func (enc *FlatEncoder) AppendObjectBegin() error
AppendObjectBegin appends a object begin character.
func (*FlatEncoder) AppendObjectEnd ¶
func (enc *FlatEncoder) AppendObjectEnd() error
AppendObjectEnd appends an object end character.
func (*FlatEncoder) AppendReflect ¶
func (enc *FlatEncoder) AppendReflect(v interface{}) error
AppendReflect appends an interface{}.
func (*FlatEncoder) AppendString ¶
func (enc *FlatEncoder) AppendString(v string) error
AppendString appends a string.
func (*FlatEncoder) AppendUint64 ¶
func (enc *FlatEncoder) AppendUint64(v uint64) error
AppendUint64 appends a uint64.
type Float32sValue ¶
type Float32sValue []float32
Float32sValue represents a slice of float32 carried by Field.
func (Float32sValue) Encode ¶
func (v Float32sValue) Encode(enc Encoder) error
Encode encodes the data represented by v to an Encoder.
type Float64Value ¶
type Float64Value float64
Float64Value represents a float64 carried by Field.
func (Float64Value) Encode ¶
func (v Float64Value) Encode(enc Encoder) error
Encode encodes the data represented by v to an Encoder.
type Float64sValue ¶
type Float64sValue []float64
Float64sValue represents a slice of float64 carried by Field.
func (Float64sValue) Encode ¶
func (v Float64sValue) Encode(enc Encoder) error
Encode encodes the data represented by v to an Encoder.
type FormatFunc ¶
type Initializer ¶
type Initializer interface {
Init() error
}
type Int16sValue ¶
type Int16sValue []int16
Int16sValue represents a slice of int16 carried by Field.
func (Int16sValue) Encode ¶
func (v Int16sValue) Encode(enc Encoder) error
Encode encodes the data represented by v to an Encoder.
type Int32sValue ¶
type Int32sValue []int32
Int32sValue represents a slice of int32 carried by Field.
func (Int32sValue) Encode ¶
func (v Int32sValue) Encode(enc Encoder) error
Encode encodes the data represented by v to an Encoder.
type Int64Value ¶
type Int64Value int64
Int64Value represents a int64 carried by Field.
func (Int64Value) Encode ¶
func (v Int64Value) Encode(enc Encoder) error
Encode encodes the data represented by v to an Encoder.
type Int64sValue ¶
type Int64sValue []int64
Int64sValue represents a slice of int64 carried by Field.
func (Int64sValue) Encode ¶
func (v Int64sValue) Encode(enc Encoder) error
Encode encodes the data represented by v to an Encoder.
type Int8sValue ¶
type Int8sValue []int8
Int8sValue represents a slice of int8 carried by Field.
func (Int8sValue) Encode ¶
func (v Int8sValue) Encode(enc Encoder) error
Encode encodes the data represented by v to an Encoder.
type JSONEncoder ¶
type JSONEncoder struct {
// contains filtered or unexported fields
}
JSONEncoder encodes Fields in json format.
func NewJSONEncoder ¶
func NewJSONEncoder(buf *bytes.Buffer) *JSONEncoder
NewJSONEncoder returns a new *JSONEncoder.
func (*JSONEncoder) AppendArrayBegin ¶
func (enc *JSONEncoder) AppendArrayBegin() error
AppendArrayBegin appends an array begin character.
func (*JSONEncoder) AppendArrayEnd ¶
func (enc *JSONEncoder) AppendArrayEnd() error
AppendArrayEnd appends an array end character.
func (*JSONEncoder) AppendBool ¶
func (enc *JSONEncoder) AppendBool(v bool) error
AppendBool appends a bool.
func (*JSONEncoder) AppendEncoderBegin ¶
func (enc *JSONEncoder) AppendEncoderBegin() error
AppendEncoderBegin appends an encoder begin character.
func (*JSONEncoder) AppendEncoderEnd ¶
func (enc *JSONEncoder) AppendEncoderEnd() error
AppendEncoderEnd appends an encoder end character.
func (*JSONEncoder) AppendFloat64 ¶
func (enc *JSONEncoder) AppendFloat64(v float64) error
AppendFloat64 appends a float64.
func (*JSONEncoder) AppendInt64 ¶
func (enc *JSONEncoder) AppendInt64(v int64) error
AppendInt64 appends an int64.
func (*JSONEncoder) AppendKey ¶
func (enc *JSONEncoder) AppendKey(key string) error
AppendKey appends a key.
func (*JSONEncoder) AppendObjectBegin ¶
func (enc *JSONEncoder) AppendObjectBegin() error
AppendObjectBegin appends a object begin character.
func (*JSONEncoder) AppendObjectEnd ¶
func (enc *JSONEncoder) AppendObjectEnd() error
AppendObjectEnd appends an object end character.
func (*JSONEncoder) AppendReflect ¶
func (enc *JSONEncoder) AppendReflect(v interface{}) error
AppendReflect appends an interface{}.
func (*JSONEncoder) AppendString ¶
func (enc *JSONEncoder) AppendString(v string) error
AppendString appends a string.
func (*JSONEncoder) AppendUint64 ¶
func (enc *JSONEncoder) AppendUint64(u uint64) error
AppendUint64 appends a uint64.
type JSONLayout ¶
type JSONLayout struct{}
A JSONLayout is a layout configurable with JSON encoding.
type Level ¶
type Level int32
Level used for identifying the severity of an event.
func ParseLevel ¶
ParseLevel parses string to a level, and returns error if the conversion fails.
type LevelFilter ¶
type LevelFilter struct {
Level Level `PluginAttribute:"level"`
}
LevelFilter logs events if the level in the Event is same or more specific than the configured level.
func (*LevelFilter) Filter ¶
func (f *LevelFilter) Filter(e *Event) Result
type LevelMatchFilter ¶
type LevelMatchFilter struct {
Level Level `PluginAttribute:"level"`
}
LevelMatchFilter logs events if the level in the Event matches the specified logging level exactly.
func (*LevelMatchFilter) Filter ¶
func (f *LevelMatchFilter) Filter(e *Event) Result
type LevelRangeFilter ¶
type LevelRangeFilter struct { Min Level `PluginAttribute:"min"` Max Level `PluginAttribute:"max"` }
LevelRangeFilter logs events if the level in the Event is in the range of the configured min and max levels.
func (*LevelRangeFilter) Filter ¶
func (f *LevelRangeFilter) Filter(e *Event) Result
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func (*Logger) WithContext ¶
WithContext 创建包含 context.Context 对象的 Entry 。
type NullAppender ¶
type NullAppender struct{}
NullAppender is an Appender that ignores log events.
func (*NullAppender) Append ¶
func (c *NullAppender) Append(e *Event)
func (*NullAppender) GetLayout ¶
func (c *NullAppender) GetLayout() Layout
func (*NullAppender) GetName ¶
func (c *NullAppender) GetName() string
func (*NullAppender) Start ¶
func (c *NullAppender) Start() error
func (*NullAppender) Stop ¶
func (c *NullAppender) Stop(ctx context.Context)
type ObjectValue ¶
type ObjectValue []Field
ObjectValue represents a slice of Field carried by Field.
func (ObjectValue) Encode ¶
func (v ObjectValue) Encode(enc Encoder) error
Encode encodes the data represented by v to an Encoder.
type PatternLayout ¶
type PatternLayout struct { ColorStyle ColorStyle `PluginAttribute:"colorStyle,default=none"` Pattern string `PluginAttribute:"pattern,default=[:level][:time][:fileline][:msg]"` // contains filtered or unexported fields }
A PatternLayout is a flexible layout configurable with pattern string.
func (*PatternLayout) Init ¶
func (c *PatternLayout) Init() error
type ReflectValue ¶
type ReflectValue struct {
Val interface{}
}
ReflectValue represents an interface{} carried by Field.
func (ReflectValue) Encode ¶
func (v ReflectValue) Encode(enc Encoder) error
Encode encodes the data represented by v to an Encoder.
type RollingFileAppender ¶
type RollingFileAppender struct {
BaseAppender
}
func (*RollingFileAppender) Append ¶
func (c *RollingFileAppender) Append(e *Event)
type StringValue ¶
type StringValue string
StringValue represents a string carried by Field.
func (StringValue) Encode ¶
func (v StringValue) Encode(enc Encoder) error
Encode encodes the data represented by v to an Encoder.
type StringsValue ¶
type StringsValue []string
StringsValue represents a slice of string carried by Field.
func (StringsValue) Encode ¶
func (v StringsValue) Encode(enc Encoder) error
Encode encodes the data represented by v to an Encoder.
type TagFilter ¶
type TimeFilter ¶
type TimeFilter struct { Timezone string `PluginAttribute:"timezone,default=Local"` Start string `PluginAttribute:"start"` End string `PluginAttribute:"end"` // contains filtered or unexported fields }
TimeFilter filters events that fall within a specified time period in each day.
func (*TimeFilter) Filter ¶
func (f *TimeFilter) Filter(e *Event) Result
func (*TimeFilter) Init ¶
func (f *TimeFilter) Init() error
type Uint16sValue ¶
type Uint16sValue []uint16
Uint16sValue represents a slice of uint16 carried by Field.
func (Uint16sValue) Encode ¶
func (v Uint16sValue) Encode(enc Encoder) error
Encode encodes the data represented by v to an Encoder.
type Uint32sValue ¶
type Uint32sValue []uint32
Uint32sValue represents a slice of uint32 carried by Field.
func (Uint32sValue) Encode ¶
func (v Uint32sValue) Encode(enc Encoder) error
Encode encodes the data represented by v to an Encoder.
type Uint64Value ¶
type Uint64Value uint64
Uint64Value represents a uint64 carried by Field.
func (Uint64Value) Encode ¶
func (v Uint64Value) Encode(enc Encoder) error
Encode encodes the data represented by v to an Encoder.
type Uint64sValue ¶
type Uint64sValue []uint64
Uint64sValue represents a slice of uint64 carried by Field.
func (Uint64sValue) Encode ¶
func (v Uint64sValue) Encode(enc Encoder) error
Encode encodes the data represented by v to an Encoder.
type Uint8sValue ¶
type Uint8sValue []uint8
Uint8sValue represents a slice of uint8 carried by Field.
func (Uint8sValue) Encode ¶
func (v Uint8sValue) Encode(enc Encoder) error
Encode encodes the data represented by v to an Encoder.
type UintsValue ¶
type UintsValue []uint
UintsValue represents a slice of uint carried by Field.
func (UintsValue) Encode ¶
func (v UintsValue) Encode(enc Encoder) error
Encode encodes the data represented by v to an Encoder.
type Writer ¶
Writer is io.Writer with a name and a Stop method.
func NewFileWriter ¶
NewFileWriter returns a FileWriter that a Writer implementation.