Documentation
¶
Index ¶
- Constants
- Variables
- type ColorLogger
- func (logger *ColorLogger) Debug(format string, args ...interface{})
- func (logger *ColorLogger) Error(format string, args ...interface{})
- func (logger *ColorLogger) GetLevel() int
- func (logger *ColorLogger) Info(format string, args ...interface{})
- func (logger *ColorLogger) Trace(format string, args ...interface{})
- func (logger *ColorLogger) Warn(format string, args ...interface{})
- type DefaultLogger
- type Func
- type Logger
Constants ¶
View Source
const LOG_LEVEL_ALL int = 0
View Source
const LOG_LEVEL_INFO int = 1
View Source
const LOG_LEVEL_NONE int = 3
View Source
const LOG_LEVEL_WARN int = 2
Variables ¶
View Source
var NilLogger = &nilLogger{}
Functions ¶
This section is empty.
Types ¶
type ColorLogger ¶
ColorLogger - A Logger that logs to stdout in color
func (*ColorLogger) Debug ¶
func (logger *ColorLogger) Debug(format string, args ...interface{})
Debug - Log a debug message
func (*ColorLogger) Error ¶
func (logger *ColorLogger) Error(format string, args ...interface{})
Error - Log a error
func (*ColorLogger) Info ¶
func (logger *ColorLogger) Info(format string, args ...interface{})
Info - Log a general message
func (*ColorLogger) Trace ¶
func (logger *ColorLogger) Trace(format string, args ...interface{})
Trace - Log a very verbose trace message
func (*ColorLogger) Warn ¶
func (logger *ColorLogger) Warn(format string, args ...interface{})
Warn - Log a warning
type Func ¶
type Func func() string
Func Function wrapper that support lazy evaluation for the logger
func NewFormatFunc ¶ added in v1.3.3
func NewFormatFunc(f func(msg string, arg ...interface{}) string, msg string, args ...interface{}) Func
NewFormatFunc Create the function wrapper that compatible with fmt.Sprintf
func NewFuncWithArg ¶
NewFuncWithArg Create the function wrapper for func(arg interface{}) string
func NewFuncWithArgs ¶
NewFuncWithArgs Create the function wrapper for func(arg ...interface{}) string
type Logger ¶
type Logger interface { Trace(format string, args ...interface{}) Debug(format string, args ...interface{}) Info(format string, args ...interface{}) Warn(format string, args ...interface{}) Error(format string, args ...interface{}) GetLevel() int }
Logger - Interface to pass into Proxy for it to log messages
Click to show internal directories.
Click to hide internal directories.