Versions in this module Expand all Collapse all v0 v0.5.1 May 7, 2025 Changes in this version + type Backend interface + Close func() error + Level func() Level + Reopen func() error + SetFormatter func(Formatter) + SetLevel func(Level) + Write func(*Record) error + type FileBackend struct + func NewFileBackend(filename string) (*FileBackend, error) + func NewIoBackend(buf io.Writer) *FileBackend + func NewStderrBackend() *FileBackend + func NewStdoutBackend() *FileBackend + func (b *FileBackend) Close() error + func (b *FileBackend) Level() Level + func (b *FileBackend) Reopen() error + func (b *FileBackend) SetFormatter(f Formatter) + func (b *FileBackend) SetLevel(l Level) + func (b FileBackend) Write(r *Record) error + type Formatter func(*Record) string + type Level byte + const Alert + const Critical + const Debug + const DefaultLevel + const Error + const Fatal + const Info + const Notice + const Trace + const Warning + func LevelByName(l string) (Level, error) + func (l Level) Name() string + type Logger struct + func GetLogger(name string) *Logger + func NewLogger(name string) *Logger + func (l *Logger) AddBackend(b Backend) + func (l *Logger) Alert(text string) + func (l *Logger) Alertf(text string, args ...interface{}) + func (l *Logger) AsStdLog(level Level) *log.Logger + func (l *Logger) Critical(text string) + func (l *Logger) Criticalf(text string, args ...interface{}) + func (l *Logger) Debug(text string) + func (l *Logger) Debugf(text string, args ...interface{}) + func (l *Logger) Error(text string) + func (l *Logger) Errorf(text string, args ...interface{}) + func (l *Logger) Fatal(text string) + func (l *Logger) Fatalf(text string, args ...interface{}) + func (l *Logger) Info(text string) + func (l *Logger) Infof(text string, args ...interface{}) + func (l *Logger) Log(level Level, m string) + func (l *Logger) Notice(text string) + func (l *Logger) Noticef(text string, args ...interface{}) + func (l *Logger) SetBackend(b ...Backend) + func (l *Logger) SetLevel(level Level) + func (l *Logger) Trace(text string) + func (l *Logger) Tracef(text string, args ...interface{}) + func (l *Logger) Warning(text string) + func (l *Logger) Warningf(text string, args ...interface{}) + type NoopBackend struct + func NewNoopBackend() (*NoopBackend, error) + func (*NoopBackend) Close() error + func (*NoopBackend) Level() Level + func (*NoopBackend) Reopen() error + func (*NoopBackend) SetFormatter(_ Formatter) + func (*NoopBackend) SetLevel(_ Level) + func (*NoopBackend) Write(_ *Record) error + type Record struct + Level Level + Logger string + Message string + Timestamp time.Time + func NewRecord(name string, l Level, m string) *Record + type SyslogBackend struct — darwin/amd64, js/wasm, linux/amd64 + func NewSyslogBackend(facilityName, tag string) (*SyslogBackend, error) + func (*SyslogBackend) Reopen() error + func (sb *SyslogBackend) Close() error + func (sb *SyslogBackend) Level() Level + func (sb *SyslogBackend) SetFormatter(f Formatter) + func (sb *SyslogBackend) SetLevel(level Level) + func (sb *SyslogBackend) Write(r *Record) error v0.1.0 Oct 28, 2016