Documentation ¶
Index ¶
- Constants
- func Debug(msg string, fields ...Field)
- func Error(msg string, fields ...Field)
- func Info(msg string, fields ...Field)
- func SetLevel(l Level)
- func SetServer(address string)
- func SetWriter(w io.Writer)
- func Warn(msg string, fields ...Field)
- type Field
- func Bool(name string, value bool) Field
- func Err(value error) Field
- func Int(name string, value int) Field
- func Int16(name string, value int16) Field
- func Int32(name string, value int32) Field
- func Int64(name string, value int64) Field
- func Int8(name string, value int8) Field
- func String(name string, value string) Field
- type Level
Constants ¶
View Source
const (
ISO8601Micro = "2006-01-02T15:04:05.000000Z0700"
)
Variables ¶
This section is empty.
Functions ¶
func SetLevel ¶
func SetLevel(l Level)
SetLevel changes the minimum level that is emitted. This is used to prevent logging from becoming too noisy. By default the minimum level is set to INFO so that DEBUG messages don't overwhelm the aggregator.
func SetServer ¶
func SetServer(address string)
SetServer starts a UDP client that sends messages to a log aggregation server. This occurs in parallel with console logging.
Types ¶
type Field ¶
type Field struct { Name string Type reflect.Kind BoolValue bool IntValue int64 StringValue string }
Field stores a name/value pair to be formatted by the emitter.
Click to show internal directories.
Click to hide internal directories.