Documentation ¶
Index ¶
- Constants
- Variables
- func GetName(names []string) string
- func SetPrinter(p *Printer)
- func ShouldPrint(setting Level, level Level) bool
- type Level
- type Logger
- func (l *Logger) Debug(format string, msg ...interface{})
- func (l *Logger) Error(err error)
- func (l *Logger) Errorf(format string, msg ...interface{})
- func (l *Logger) Extend(names ...string) *Logger
- func (l *Logger) Info(format string, msg ...interface{})
- func (l *Logger) IsDebug() bool
- func (l *Logger) IsError() bool
- func (l *Logger) IsInfo() bool
- func (l *Logger) IsWarn() bool
- func (l *Logger) Line()
- func (l *Logger) Log(format string, msg ...interface{})
- func (l *Logger) New(names ...string) *Logger
- func (l *Logger) NewLine()
- func (l *Logger) Panic(err error)
- func (l *Logger) Panicf(format string, msg ...interface{})
- func (l *Logger) SetLevel(lvl Level) *Logger
- func (l *Logger) ToTable(size uint) *Table
- func (l *Logger) Warn(err error)
- func (l *Logger) Warnf(format string, msg ...interface{})
- type Manager
- type Printer
- type Table
Constants ¶
View Source
const ( LINE = "------------------------------------------------------------" EMPTY = "" TAB = '\t' )
Variables ¶
View Source
var DefaultManager = NewManager( make([]string, 0), INFO, DefaultPrinter, )
View Source
var DefaultPrinter = NewPrinter(os.Stdout)
Default printer when not specify
Functions ¶
func ShouldPrint ¶
Types ¶
type Printer ¶
type Printer struct {
// contains filtered or unexported fields
}
Printer is printable object where it doesn't have own level but it still respect SILENT mode Normally, you going to use this kind of output for custom format (table, readme etc.)
Click to show internal directories.
Click to hide internal directories.