Versions in this module Expand all Collapse all v1 v1.0.0 Mar 17, 2017 Changes in this version + const LoggingEnv + var DefaultCaller = &Caller + var DefaultLogger = NewHierarchy(NewLogfmtLogger(os.Stderr, Discard)) + var DefaultTimestamp = &TimeDynamic + var DefaultTimestampUTC = &TimeDynamic + var Err = Key("err") + var FilterCount = Key("filter_count") + var Msg = Key("msg") + func FiltersFromString(newRegex string) (map[string]*regexp.Regexp, error) + func IfErr(l Logger, err error) + func IsDisabled(l Logger) bool + type Caller struct + Depth int + func (c *Caller) LogValue() interface{} + type ChannelLogger struct + Err chan error + OnFull Logger + Out chan []interface{} + func NewChannelLogger(size int, onFull Logger) *ChannelLogger + func (c *ChannelLogger) ErrorLogger(err error) Logger + func (c *ChannelLogger) Log(kvs ...interface{}) + type Context struct + KeyVals []interface{} + Logger Logger + func NewContext(logger Logger) *Context + func (l *Context) Disabled() bool + func (l *Context) Log(keyvals ...interface{}) + func (l *Context) With(keyvals ...interface{}) *Context + func (l *Context) WithPrefix(keyvals ...interface{}) *Context + type Counter struct + Count int64 + func (c *Counter) ErrorLogger(error) Logger + func (c *Counter) Log(keyvals ...interface{}) + type CtxDimensions struct + func (c *CtxDimensions) Append(ctx context.Context, vals ...interface{}) context.Context + func (c *CtxDimensions) From(ctx context.Context) []interface{} + func (c *CtxDimensions) With(ctx context.Context, log Logger) *Context + type Disableable interface + Disabled func() bool + type Dynamic interface + LogValue func() interface{} + type DynamicFunc func() interface + func (d DynamicFunc) LogValue() interface{} + type ErrorHandler interface + ErrorLogger func(error) Logger + var DefaultErrorHandler ErrorHandler = Discard + type ErrorHandlerFunc func(error) Logger + func (f ErrorHandlerFunc) ErrorLogger(e error) Logger + type ErrorHandlingDisableableLogger interface + var Discard ErrorHandlingDisableableLogger = nop{} + type ErrorHandlingLogger interface + var Panic ErrorHandlingLogger = &panicLogger{} + type ErrorLogLogger struct + ErrHandler ErrorHandler + RootLogger ErrorLogger + func FromGokit(logger ErrorLogger) *ErrorLogLogger + func (e *ErrorLogLogger) ErrorLogger(err error) Logger + func (e *ErrorLogLogger) Log(keyvals ...interface{}) + type ErrorLogger interface + Log func(keyvals ...interface{}) error + func ToGokit(logger Logger) ErrorLogger + type Filter interface + WouldLog func(keyvals ...interface{}) bool + type FilterChangeHandler struct + Filter *RegexFilter + Log Logger + func (f *FilterChangeHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request) + type Gate struct + DisabledFlag int64 + Logger Logger + func (g *Gate) Disable() + func (g *Gate) Disabled() bool + func (g *Gate) Enable() + func (g *Gate) Log(kvs ...interface{}) + type Hierarchy struct + func NewHierarchy(defaultLogger Logger) *Hierarchy + func (l *Hierarchy) CreateChild() *Hierarchy + func (l *Hierarchy) Disabled() bool + func (l *Hierarchy) Log(kvs ...interface{}) + func (l *Hierarchy) Set(logger Logger) + type JSONLogger struct + MissingValueKey Key + Out io.Writer + func (j *JSONLogger) Log(keyvals ...interface{}) error + type Key string + func (k Key) String() string + type LogfmtLogger struct + MissingValueKey Key + Out io.Writer + func (l *LogfmtLogger) Log(keyvals ...interface{}) error + type Logger interface + Log func(keyvals ...interface{}) + func NewJSONLogger(w io.Writer, ErrHandler ErrorHandler) Logger + func NewLogfmtLogger(w io.Writer, ErrHandler ErrorHandler) Logger + type LoggerFunc func(...interface{}) + func (f LoggerFunc) Log(keyvals ...interface{}) + type LoggerKit struct + LogTo Logger + func (k *LoggerKit) Log(keyvals ...interface{}) error + type MultiFilter struct + Filters []Filter + PassTo Logger + func (f *MultiFilter) Disabled() bool + func (f *MultiFilter) Log(keyvals ...interface{}) + type MultiLogger []Logger + func (c MultiLogger) Disabled() bool + func (c MultiLogger) Log(keyvals ...interface{}) + type RateLimitedLogger struct + EventCounter eventcounter.EventCounter + Limit int64 + LimitLogger Logger + Logger Logger + Now func() time.Time + func NewOnePerSecond(log Logger) *RateLimitedLogger + func (r *RateLimitedLogger) Disabled() bool + func (r *RateLimitedLogger) Log(kvs ...interface{}) + type RegexFilter struct + ErrCallback ErrorHandler + Log Logger + MissingValueKey Key + func (f *RegexFilter) Disabled() bool + func (f *RegexFilter) GetFilters() map[string]*regexp.Regexp + func (f *RegexFilter) SetFilters(filters map[string]*regexp.Regexp) + func (f *RegexFilter) Stats() Stats + func (f *RegexFilter) Var() expvar.Var + func (f *RegexFilter) WouldLog(keyvals ...interface{}) bool + type Stats struct + ChangeIndex int64 + FilterLen int + type TimeDynamic struct + AsString bool + Layout string + TimeKeeper timekeeper.TimeKeeper + UTC bool + func (t *TimeDynamic) LogValue() interface{} + type TimeSince struct + Start time.Time + TimeKeeper timekeeper.TimeKeeper + func (c *TimeSince) LogValue() interface{}