Versions in this module Expand all Collapse all v0 v0.0.1 Jul 21, 2022 Changes in this version + const AsyncRootLoggerName + const ColorStyleBright + const ColorStyleNone + const ColorStyleNormal + const DebugLevel + const ErrorLevel + const FatalLevel + const GRPCFailure + const GRPCSuccess + const HttpFailure + const HttpSuccess + const InfoLevel + const MysqlFailure + const MysqlSuccess + const NoneLevel + const OffLevel + const PanicLevel + const PluginTypeAppender + const PluginTypeFilter + const PluginTypeLayout + const RedisFailure + const RedisSuccess + const RequestIn + const RequestOut + const ResultAccept + const ResultDeny + const RootLoggerName + const TraceLevel + const Undefined + const WarnLevel + var Status = NewLogger("", ErrorLevel) + var Writers = &writers + func Caller(skip int, fast bool) (file string, line int, loaded bool) + func Refresh(fileName string) error + func RegisterConverter(fn util.Converter) + func RegisterPlugin(name string, typ string, i interface{}) + func RegisterReader(r Reader, ext ...string) + type Appender interface + Append func(e *Event) + GetLayout func() Layout + GetName func() string + type AppenderRef struct + Filter Filter + Level Level + Ref string + func (r *AppenderRef) Append(e *Event) + type BaseAppender struct + Layout Layout + Name string + func (c *BaseAppender) GetLayout() Layout + func (c *BaseAppender) GetName() string + func (c *BaseAppender) Start() error + func (c *BaseAppender) Stop(ctx context.Context) + type BaseFilter struct + OnMatch Result + OnMismatch Result + func (c *BaseFilter) Start() error + func (c *BaseFilter) Stop(ctx context.Context) + type ColorStyle int + func ParseColorStyle(s string) (ColorStyle, error) + type CompositeFilter struct + Filters []Filter + func (f *CompositeFilter) Filter(level Level, e Entry, msg Message) Result + func (f *CompositeFilter) Start() error + func (f *CompositeFilter) Stop(ctx context.Context) + type ConsoleAppender struct + func (c *ConsoleAppender) Append(e *Event) + type ContextEntry struct + func (e *ContextEntry) Context() context.Context + func (e *ContextEntry) Errno() Errno + func (e *ContextEntry) Tag() string + func (e ContextEntry) Debug(args ...interface{}) *Event + func (e ContextEntry) Debugf(format string, args ...interface{}) *Event + func (e ContextEntry) Error(errno Errno, args ...interface{}) *Event + func (e ContextEntry) Errorf(errno Errno, format string, args ...interface{}) *Event + func (e ContextEntry) Fatal(args ...interface{}) *Event + func (e ContextEntry) Fatalf(format string, args ...interface{}) *Event + func (e ContextEntry) Info(args ...interface{}) *Event + func (e ContextEntry) Infof(format string, args ...interface{}) *Event + func (e ContextEntry) Panic(args ...interface{}) *Event + func (e ContextEntry) Panicf(format string, args ...interface{}) *Event + func (e ContextEntry) Trace(args ...interface{}) *Event + func (e ContextEntry) Tracef(format string, args ...interface{}) *Event + func (e ContextEntry) Warn(args ...interface{}) *Event + func (e ContextEntry) Warnf(format string, args ...interface{}) *Event + func (e ContextEntry) WithSkip(n int) ContextEntry + func (e ContextEntry) WithTag(tag string) ContextEntry + type CountingNoOpAppender struct + func (c *CountingNoOpAppender) Append(e *Event) + func (c *CountingNoOpAppender) Count() int64 + func (c *CountingNoOpAppender) Start() error + func (c *CountingNoOpAppender) Stop(ctx context.Context) + type DefaultLayout struct + ColorStyle ColorStyle + LineBreak bool + func (c *DefaultLayout) ToBytes(e *Event) ([]byte, error) + type DenyAllFilter struct + func (f *DenyAllFilter) Filter(_ Level, _ Entry, _ Message) Result + func (f *DenyAllFilter) Start() error + func (f *DenyAllFilter) Stop(ctx context.Context) + type Entry interface + Context func() context.Context + Errno func() Errno + Tag func() string + type Errno interface + Code func() uint32 + Msg func() string + var ERROR Errno = &errno{ ... } + var OK Errno = &errno{ ... } + func NewErrno(project uint32, code uint16, msg string) Errno + type Event struct + func (e *Event) Entry() Entry + func (e *Event) File() string + func (e *Event) Level() Level + func (e *Event) Line() int + func (e *Event) Msg() Message + func (e *Event) Time() time.Time + type FileAppender struct + FileName string + func (c *FileAppender) Append(e *Event) + func (c *FileAppender) Start() error + func (c *FileAppender) Stop(ctx context.Context) + type FileWriter struct + func (c *FileWriter) Name() string + func (c *FileWriter) Stop(ctx context.Context) + func (c *FileWriter) Write(p []byte) (n int, err error) + type Filter interface + Filter func(level Level, e Entry, msg Message) Result + type FormattedMessage struct + func (msg *FormattedMessage) Text() string + type Initializer interface + Init func() error + type Int64 struct + func (i *Int64) Add(delta int64) int64 + func (i *Int64) CompareAndSwap(old, new int64) bool + func (i *Int64) Load() int64 + func (i *Int64) Store(val int64) + func (i *Int64) Swap(new int64) int64 + type JsonMessage struct + func (msg *JsonMessage) Text() string + type Layout interface + ToBytes func(e *Event) ([]byte, error) + type Level int32 + func ParseLevel(str string) (Level, error) + func (level Level) String() string + type LevelFilter struct + Level Level + func (f *LevelFilter) Filter(level Level, e Entry, msg Message) Result + type LevelMatchFilter struct + Level Level + func (f *LevelMatchFilter) Filter(level Level, e Entry, msg Message) Result + type LevelRangeFilter struct + MaxLevel Level + MinLevel Level + func (f *LevelRangeFilter) Filter(level Level, e Entry, msg Message) Result + type LifeCycle interface + Start func() error + Stop func(ctx context.Context) + type Logger struct + func GetLogger(level ...Level) *Logger + func NewLogger(name string, level Level) *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) Error(args ...interface{}) *Event + func (l *Logger) Errorf(format string, args ...interface{}) *Event + func (l *Logger) Fatal(args ...interface{}) *Event + func (l *Logger) Fatalf(format string, args ...interface{}) *Event + func (l *Logger) Filter() Filter + func (l *Logger) Info(args ...interface{}) *Event + func (l *Logger) Infof(format string, args ...interface{}) *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) Trace(args ...interface{}) *Event + func (l *Logger) Tracef(format string, args ...interface{}) *Event + func (l *Logger) Warn(args ...interface{}) *Event + func (l *Logger) Warnf(format string, args ...interface{}) *Event + func (l *Logger) WithContext(ctx context.Context) ContextEntry + func (l *Logger) WithSkip(n int) SimpleEntry + func (l *Logger) WithTag(tag string) SimpleEntry + type Message interface + Text func() string + func NewFormattedMessage(format string, args []interface{}) Message + func NewJsonMessage(data interface{}) Message + type NoCopy struct + func (*NoCopy) Lock() + func (*NoCopy) Unlock() + type Node struct + Attributes map[string]string + Children []*Node + Label string + type NullAppender struct + func (c *NullAppender) Append(e *Event) + func (c *NullAppender) Start() error + func (c *NullAppender) Stop(ctx context.Context) + type OptimizedMessage struct + func (msg *OptimizedMessage) Once(fn func() string) string + type Plugin struct + Class reflect.Type + File string + Line int + Name string + Type string + type PluginTag string + func (tag PluginTag) Get(key string) string + func (tag PluginTag) Lookup(key string) (value string, ok bool) + type Reader interface + Read func(b []byte) (*Node, error) + type Result int + func ParseResult(s string) (Result, error) + type RollingFileAppender struct + func (c *RollingFileAppender) Append(e *Event) + type SimpleEntry struct + func (e *SimpleEntry) Context() context.Context + func (e *SimpleEntry) Errno() Errno + func (e *SimpleEntry) Tag() string + func (e SimpleEntry) Debug(args ...interface{}) *Event + func (e SimpleEntry) Debugf(format string, args ...interface{}) *Event + func (e SimpleEntry) Error(args ...interface{}) *Event + func (e SimpleEntry) Errorf(format string, args ...interface{}) *Event + func (e SimpleEntry) Fatal(args ...interface{}) *Event + func (e SimpleEntry) Fatalf(format string, args ...interface{}) *Event + func (e SimpleEntry) Info(args ...interface{}) *Event + func (e SimpleEntry) Infof(format string, args ...interface{}) *Event + func (e SimpleEntry) Panic(args ...interface{}) *Event + func (e SimpleEntry) Panicf(format string, args ...interface{}) *Event + func (e SimpleEntry) Trace(args ...interface{}) *Event + func (e SimpleEntry) Tracef(format string, args ...interface{}) *Event + func (e SimpleEntry) Warn(args ...interface{}) *Event + func (e SimpleEntry) Warnf(format string, args ...interface{}) *Event + func (e SimpleEntry) WithContext(ctx context.Context) ContextEntry + func (e SimpleEntry) WithSkip(n int) SimpleEntry + func (e SimpleEntry) WithTag(tag string) SimpleEntry + type TimeFilter struct + End string + Start string + TimeFunc func() time.Time + Timezone string + func (f *TimeFilter) Filter(level Level, e Entry, msg Message) Result + func (f *TimeFilter) Init() error + type Value struct + type Writer interface + Name func() string + Stop func(ctx context.Context) + func NewFileWriter(fileName string) (Writer, error) + type XMLReader struct + func (r *XMLReader) Read(b []byte) (*Node, error)