Versions in this module Expand all Collapse all v2 v2.5.8 Nov 18, 2021 Changes in this version + func Trace(suffix ...interface{}) string + func TraceIn(suffix ...interface{}) string + func TraceOut(suffix ...interface{}) string + type Advisor interface + Dynamic func(<-chan bytes.Buffer) State + Static func(*ring.Ring) bool + func NewAdvisor(advisorType Advisor) Advisor + type AmbientContext struct + ERR error + Logs *Logger + OK bool + func Add(errs ...interface{}) *AmbientContext + func Handles(errs ...interface{}) *AmbientContext + func Log(errs ...interface{}) *AmbientContext + func New() *AmbientContext + func (ambctx *AmbientContext) Add(errs ...interface{}) *AmbientContext + func (ambctx *AmbientContext) Dump() chan Error + func (ambctx *AmbientContext) Handles(errs ...interface{}) *AmbientContext + func (ambctx *AmbientContext) Log(msgs ...interface{}) *AmbientContext + func (ambctx *AmbientContext) Trace(suffix ...interface{}) string + func (ambctx *AmbientContext) TraceIn(suffix ...interface{}) string + func (ambctx *AmbientContext) TraceOut(suffix ...interface{}) string + func (ambctx *AmbientContext) With(opcode OpCode) *AmbientContext + type Collector struct + func NewCollector(ringSize int) *Collector + func (collector *Collector) Add(errs []interface{}) bool + func (collector *Collector) Dump() chan Error + type ConsoleLogger struct + func (logChannel ConsoleLogger) Critical(msgs ...interface{}) bool + func (logChannel ConsoleLogger) Debug(msgs ...interface{}) bool + func (logChannel ConsoleLogger) Error(msgs ...interface{}) bool + func (logChannel ConsoleLogger) Fatal(msgs ...interface{}) bool + func (logChannel ConsoleLogger) Info(msgs ...interface{}) bool + func (logChannel ConsoleLogger) Panic(msgs ...interface{}) bool + func (logChannel ConsoleLogger) Warning(msgs ...interface{}) bool + type DefaultAdvisor struct + func (advisor DefaultAdvisor) Dynamic(<-chan bytes.Buffer) State + func (advisor DefaultAdvisor) Static(ringBuffer *ring.Ring) bool + type ElasticLogger struct + func (logChannel ElasticLogger) Critical(msgs ...interface{}) bool + func (logChannel ElasticLogger) Debug(msgs ...interface{}) bool + func (logChannel ElasticLogger) Error(msgs ...interface{}) bool + func (logChannel ElasticLogger) Fatal(msgs ...interface{}) bool + func (logChannel ElasticLogger) Info(msgs ...interface{}) bool + func (logChannel ElasticLogger) Panic(msgs ...interface{}) bool + func (logChannel ElasticLogger) Warning(msgs ...interface{}) bool + type ErrType uint + const CRITICAL + const DEBUG + const ERROR + const FATAL + const INFO + const PANIC + const WARNING + type Error struct + Err error + ErrType ErrType + func (wrapper Error) ToString() string + type FileLogger struct + func (logChannel FileLogger) Critical(msgs ...interface{}) bool + func (logChannel FileLogger) Debug(msgs ...interface{}) bool + func (logChannel FileLogger) Error(msgs ...interface{}) bool + func (logChannel FileLogger) Fatal(msgs ...interface{}) bool + func (logChannel FileLogger) Info(msgs ...interface{}) bool + func (logChannel FileLogger) Panic(msgs ...interface{}) bool + func (logChannel FileLogger) Warning(msgs ...interface{}) bool + type Guard struct + Err error + func NewGuard(handler func()) *Guard + func (guard *Guard) Check() + func (guard *Guard) Rescue() func() + type LogChannel interface + Critical func(msgs ...interface{}) bool + Debug func(msgs ...interface{}) bool + Error func(msgs ...interface{}) bool + Fatal func(msgs ...interface{}) bool + Info func(msgs ...interface{}) bool + Panic func(msgs ...interface{}) bool + Warning func(msgs ...interface{}) bool + func NewConsoleLogger() LogChannel + func NewElasticLogger() LogChannel + func NewFileLogger() LogChannel + type LogMessage struct + Level string + Message string + Timestamp time.Time + type Logger struct + var Logs *Logger + func NewLogger(channels ...LogChannel) *Logger + func (logger *Logger) Debug(msgs ...interface{}) bool + func (logger *Logger) Error(msgs ...interface{}) bool + func (logger *Logger) Info(msgs ...interface{}) bool + func (logger *Logger) LogWithLevel(level string, msgs ...interface{}) bool + func (logger *Logger) Send(msgs ...interface{}) bool + func (logger *Logger) Warning(msgs ...interface{}) bool + type OpCode uint + const KILL + const NOOP + const RECV + const RETR + const RTRN + type Sampler struct + type State uint + const BAD + const DEAD + const NO + const OK + type Tracer struct + func NewTracer(on bool) *Tracer + func (tracer Tracer) Caller(prefix string, suffix ...interface{}) string