Versions in this module Expand all Collapse all v1 v1.0.0 Jun 18, 2020 Changes in this version + var DefaultFormatter Formatter = defaultFormatter + var DefaultHandler Handler = NewFileHandler(os.Stderr) + var DefaultLevel Level = INFO + var DefaultLogger Logger = NewLogger(procName) + var LevelColors = map[Level]Color + func Critical(args ...interface{}) + func Criticalf(format string, args ...interface{}) + func Criticalln(args ...interface{}) + func Debug(args ...interface{}) + func Debugf(format string, args ...interface{}) + func Debugln(args ...interface{}) + func Error(args ...interface{}) + func Errorf(format string, args ...interface{}) + func Errorln(args ...interface{}) + func Fatal(args ...interface{}) + func Fatalf(format string, args ...interface{}) + func Fatalln(args ...interface{}) + func Info(args ...interface{}) + func Infof(format string, args ...interface{}) + func Infoln(args ...interface{}) + func Notice(args ...interface{}) + func Noticef(format string, args ...interface{}) + func Noticeln(args ...interface{}) + func Panic(args ...interface{}) + func Panicf(format string, args ...interface{}) + func Panicln(args ...interface{}) + func SetLevel(l Level) + func Warning(args ...interface{}) + func Warningf(format string, args ...interface{}) + func Warningln(args ...interface{}) + type BaseHandler struct + Formatter Formatter + Level Level + func NewBaseHandler() *BaseHandler + func (h *BaseHandler) FilterAndFormat(rec *Record) string + func (h *BaseHandler) SetFormatter(f Formatter) + func (h *BaseHandler) SetLevel(l Level) + type Color int + const BLACK + const BLUE + const CYAN + const GREEN + const MAGENTA + const NOCOLOR + const RED + const WHITE + const YELLOW + type FileHandler struct + func NewFileHandler(f *os.File) *FileHandler + func (h *FileHandler) Close() error + func (h *FileHandler) Handle(rec *Record) + type Formatter interface + Format func(*Record) (message string) + type Handler interface + Close func() error + Handle func(*Record) + SetFormatter func(Formatter) + SetLevel func(Level) + type Level int + const CRITICAL + const DEBUG + const ERROR + const INFO + const NOTICE + const WARNING + func (l Level) String() string + type Logger interface + Critical func(args ...interface{}) + Criticalf func(format string, args ...interface{}) + Criticalln func(args ...interface{}) + Debug func(args ...interface{}) + Debugf func(format string, args ...interface{}) + Debugln func(args ...interface{}) + Error func(args ...interface{}) + Errorf func(format string, args ...interface{}) + Errorln func(args ...interface{}) + Fatal func(args ...interface{}) + Fatalf func(format string, args ...interface{}) + Fatalln func(args ...interface{}) + Info func(args ...interface{}) + Infof func(format string, args ...interface{}) + Infoln func(args ...interface{}) + Notice func(args ...interface{}) + Noticef func(format string, args ...interface{}) + Noticeln func(args ...interface{}) + Panic func(args ...interface{}) + Panicf func(format string, args ...interface{}) + Panicln func(args ...interface{}) + SetCallDepth func(int) + SetHandler func(Handler) + SetLevel func(Level) + Warning func(args ...interface{}) + Warningf func(format string, args ...interface{}) + Warningln func(args ...interface{}) + func NewLogger(name string) Logger + type MultiHandler struct + func NewMultiHandler(handlers ...Handler) *MultiHandler + func (b *MultiHandler) Close() error + func (b *MultiHandler) Handle(rec *Record) + func (b *MultiHandler) SetFormatter(f Formatter) + func (b *MultiHandler) SetLevel(l Level) + type Record struct + Filename string + Level Level + Line int + LoggerName string + Message string + ProcessID int + ProcessName string + Time time.Time + type SyslogHandler struct — darwin/amd64, js/wasm, linux/amd64 + func NewSyslogHandler(tag string) (*SyslogHandler, error) + func NewSyslogHandlerDial(network, raddr, tag string) (*SyslogHandler, error) + func (b *SyslogHandler) Close() error + func (b *SyslogHandler) Handle(rec *Record) + type WriterHandler struct + func NewWriterHandler(w io.Writer) *WriterHandler + func (b *WriterHandler) Close() error + func (b *WriterHandler) Handle(rec *Record)