Documentation ¶
Index ¶
- func AddEverythingFromPattern(pattern string)
- func AddNothingExceptFilter(pattern string)
- func Debugf(format string, v ...interface{})
- func Debugln(v ...interface{})
- func Errorf(format string, v ...interface{})
- func Errorln(v ...interface{})
- func ExcludeFromPattern(pattern string)
- func Infof(format string, v ...interface{})
- func Infoln(v ...interface{})
- func Printf(level Level, format string, v ...interface{})
- func Println(level Level, v ...interface{})
- func SetLevel(level Level)
- func SetStd(logger *Logger)
- func Warnf(format string, v ...interface{})
- func Warnln(v ...interface{})
- type Level
- type Logger
- func (l *Logger) AddEverythingFromPattern(pattern string)
- func (l *Logger) AddNothingExceptFilter(pattern string)
- func (l *Logger) ExcludeFromPattern(pattern string)
- func (l *Logger) Printf(level Level, format string, v ...interface{})
- func (l *Logger) Println(level Level, v ...interface{})
- func (l *Logger) SetLevel(level Level)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddEverythingFromPattern ¶
func AddEverythingFromPattern(pattern string)
AddEverythingFromPattern adds a pattern to skip log level filtering, guaranteeing all logs matching the pattern are seen
func AddNothingExceptFilter ¶
func AddNothingExceptFilter(pattern string)
AddNothingExceptFilter enables strong filtering showing logs only for things on the approved list, adding this pattern to the list
func Debugf ¶
func Debugf(format string, v ...interface{})
Debugf outputs the format and variables at the Debug level
func Errorf ¶
func Errorf(format string, v ...interface{})
Errorf outputs the format and variables at the Error level
func ExcludeFromPattern ¶ added in v1.0.4
func ExcludeFromPattern(pattern string)
ExcludeFromPattern adds a pattern to exclude logs from
func Infof ¶
func Infof(format string, v ...interface{})
Infof outputs the format and variables at the Info level
func Println ¶
func Println(level Level, v ...interface{})
Println outputs the varibles assuming they pass the filter level
func SetLevel ¶
func SetLevel(level Level)
SetLevel changes the filtering level of the system logger
func SetStd ¶ added in v1.0.6
func SetStd(logger *Logger)
SetStd sets the default logger all other functions use
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger is a go Logger wrapper that adds log levels and pattern filtering It allows high level 'log level' filtering broadly It allows allows two addition levels of filtering:
everythingFrom which allows inclusion of packages/patterns along with general logging nothingExcept which allows focusing on just listed areas
func NewFile ¶ added in v1.0.6
NewFile returns a new Logger that logs to the supplied file with a filter set to the supplied level
func (*Logger) AddEverythingFromPattern ¶
AddEverythingFromPattern adds a pattern to skip log level filtering, guaranteeing all logs matching the pattern are seen
func (*Logger) AddNothingExceptFilter ¶
AddNothingExceptFilter enables strong filtering showing logs only for things on the approved list, adding this pattern to the list
func (*Logger) ExcludeFromPattern ¶ added in v1.0.4
ExcludeFromPattern adds a pattern to exclude logs from
func (*Logger) Printf ¶
Printf outputs the format and variables, assuming it passes the filter levels