countlog

package module
v0.0.0-...-fd2130c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

README

countlog

Sourcegraph GoDoc Build Status codecov rcard License

unified event logging interface with counting capability

Documentation

Index

Constants

View Source
const LevelDebug = logger.LevelDebug
View Source
const LevelDebugCall = logger.LevelDebugCall
View Source
const LevelError = logger.LevelError
View Source
const LevelFatal = logger.LevelFatal
View Source
const LevelInfo = logger.LevelInfo
View Source
const LevelInfoCall = logger.LevelInfoCall
View Source
const LevelTrace = logger.LevelTrace
View Source
const LevelTraceCall = logger.LevelTraceCall
View Source
const LevelWarn = logger.LevelWarn

Variables

View Source
var EventAggregator logger.EventSink = stats.NewEventAggregator(func(aggregator *stats.EventAggregator) {
	aggregator.Collector = nil
})
View Source
var EventWriter logger.EventSink = output.NewEventWriter(func(eventWriter *output.EventWriter) {
	eventWriter.Format = &hrf.Format{}
	eventWriter.Writer = os.Stdout
})

Functions

func Debug

func Debug(event string, properties ...interface{})

func DebugCall

func DebugCall(event string, err error, properties ...interface{}) error

DebugCall will calculate stats in DEBUG level DebugCall will output individual log entries in DEBUG_CALL level (TRACE includes DEBUG_CALL)

func Error

func Error(event string, properties ...interface{})

func Fatal

func Fatal(event string, properties ...interface{})

func Info

func Info(event string, properties ...interface{})

func InfoCall

func InfoCall(event string, err error, properties ...interface{}) error

InfoCall will calculate stats in INFO level InfoCall will output individual log entries in INFO_CALL level (DEBUG includes INFO_CALL)

func Log

func Log(level int, event string, properties ...interface{})

func LogPanic

func LogPanic(recovered interface{}, properties ...interface{}) interface{}

func SetMinLevel

func SetMinLevel(level int)

func ShouldLog

func ShouldLog(level int) bool

func Trace

func Trace(event string, properties ...interface{})

func TraceCall

func TraceCall(event string, err error, properties ...interface{}) error

TraceCall will calculate stats in TRACE level TraceCall will output individual log entries in TRACE_CALL level

func Warn

func Warn(event string, properties ...interface{})

Types

type Context

type Context struct {
	context.Context
	// contains filtered or unexported fields
}

func Ctx

func Ctx(ctx context.Context) *Context

func (*Context) Add

func (ctx *Context) Add(key string, value interface{})

func (*Context) Debug

func (ctx *Context) Debug(event string, properties ...interface{})

func (*Context) DebugCall

func (ctx *Context) DebugCall(event string, err error, properties ...interface{}) error

func (*Context) Error

func (ctx *Context) Error(event string, properties ...interface{})

func (*Context) Fatal

func (ctx *Context) Fatal(event string, properties ...interface{})

func (*Context) Info

func (ctx *Context) Info(event string, properties ...interface{})

func (*Context) InfoCall

func (ctx *Context) InfoCall(event string, err error, properties ...interface{}) error

func (*Context) LogAccess

func (ctx *Context) LogAccess(event string, err error, properties ...interface{}) error

func (*Context) Trace

func (ctx *Context) Trace(event string, properties ...interface{})

func (*Context) TraceCall

func (ctx *Context) TraceCall(event string, err error, properties ...interface{}) error

func (*Context) Value

func (ctx *Context) Value(key interface{}) interface{}

func (*Context) Warn

func (ctx *Context) Warn(event string, properties ...interface{})

Directories

Path Synopsis
hrf
rotation

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL