Documentation ¶
Index ¶
- Variables
- func ColorFormat(attrs ...ColorAttribute) string
- func Debug(message ...interface{})
- func Error(message ...interface{})
- func Fatal(message ...interface{})
- func FormatLog(isTerminal bool, entry *Entry) string
- func Info(message ...interface{})
- func IsDebugEnabled() bool
- func IsErrorEnabled() bool
- func IsFatalEnabled() bool
- func IsInfoEnabled() bool
- func IsLogStack() bool
- func IsWarnEnabled() bool
- func Print(v ...interface{})
- func Println(v ...interface{})
- func SetLevel(level Level)
- func SetLogStack(logStack bool)
- func SetProvider(provider Provider)
- func Warn(message ...interface{})
- type ColorAttribute
- type ColorSetter
- type Console
- type Entry
- type Exception
- type Level
- type Logger
- func (l *Logger) Debug(message ...interface{})
- func (l *Logger) Error(message ...interface{})
- func (l *Logger) Fatal(message ...interface{})
- func (l *Logger) Info(message ...interface{})
- func (l *Logger) IsDebugEnabled() bool
- func (l *Logger) IsErrorEnabled() bool
- func (l *Logger) IsFatalEnabled() bool
- func (l *Logger) IsInfoEnabled() bool
- func (l *Logger) IsLogStack() bool
- func (l *Logger) IsWarnEnabled() bool
- func (l *Logger) Level() Level
- func (l *Logger) Name() string
- func (l *Logger) Provider() Provider
- func (l *Logger) SetLevel(level Level)
- func (l *Logger) SetLogStack(logStack bool)
- func (l *Logger) SetProvider(provider Provider)
- func (l *Logger) Warn(message ...interface{})
- type Provider
Constants ¶
This section is empty.
Variables ¶
View Source
var ResetSetter = func() ColorSetter { color := ColorFormat(Reset) return func(isTerminal bool) string { if !isTerminal { return "" } return color } }()
Functions ¶
func ColorFormat ¶
func ColorFormat(attrs ...ColorAttribute) string
func IsDebugEnabled ¶
func IsDebugEnabled() bool
func IsErrorEnabled ¶
func IsErrorEnabled() bool
func IsFatalEnabled ¶
func IsFatalEnabled() bool
func IsInfoEnabled ¶
func IsInfoEnabled() bool
func IsLogStack ¶
func IsLogStack() bool
func IsWarnEnabled ¶
func IsWarnEnabled() bool
func SetLogStack ¶
func SetLogStack(logStack bool)
func SetProvider ¶
func SetProvider(provider Provider)
Types ¶
type ColorAttribute ¶
type ColorAttribute int
ColorAttribute defines a single SGR Code
const ( Reset ColorAttribute = iota Bold Faint Italic Underline BlinkSlow BlinkRapid ReverseVideo Concealed CrossedOut )
Base attributes
const ( FgBlack ColorAttribute = iota + 30 FgRed FgGreen FgYellow FgBlue FgMagenta FgCyan FgWhite )
Foreground text colors
const ( FgHiBlack ColorAttribute = iota + 90 FgHiRed FgHiGreen FgHiYellow FgHiBlue FgHiMagenta FgHiCyan FgHiWhite )
Foreground Hi-Intensity text colors
const ( BgBlack ColorAttribute = iota + 40 BgRed BgGreen BgYellow BgBlue BgMagenta BgCyan BgWhite )
Background text colors
const ( BgHiBlack ColorAttribute = iota + 100 BgHiRed BgHiGreen BgHiYellow BgHiBlue BgHiMagenta BgHiCyan BgHiWhite )
Background Hi-Intensity text colors
type ColorSetter ¶
func GetColorSetter ¶
func GetColorSetter(name string) ColorSetter
func SetColorSetter ¶
func SetColorSetter(name string, setter ColorSetter) ColorSetter
type Console ¶
type Console struct {
// contains filtered or unexported fields
}
func NewConsole ¶
func NewConsole() *Console
type Exception ¶
type Exception struct {
// contains filtered or unexported fields
}
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func (*Logger) IsDebugEnabled ¶
func (*Logger) IsErrorEnabled ¶
func (*Logger) IsFatalEnabled ¶
func (*Logger) IsInfoEnabled ¶
func (*Logger) IsLogStack ¶
func (*Logger) IsWarnEnabled ¶
func (*Logger) SetLogStack ¶
func (*Logger) SetProvider ¶
Click to show internal directories.
Click to hide internal directories.