Documentation ¶
Index ¶
- type Logger
- func (l Logger) Debug(a ...interface{})
- func (l Logger) DebugWriter() io.Writer
- func (l Logger) Debugf(format string, a ...interface{})
- func (l Logger) Info(a ...interface{})
- func (l Logger) InfoWriter() io.Writer
- func (l Logger) Infof(format string, a ...interface{})
- func (l Logger) IsDebugEnabled() bool
- func (l Logger) IsInfoEnabled() bool
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger logs messages to a writer.
func NewLogger ¶
NewLogger creates a new instance of Logger. It configures debug logging if $BP_DEBUG is set.
func NewLoggerWithOptions ¶
NewLoggerWithOptions create a new instance of Logger. It configures the Logger with options.
func (Logger) Debug ¶
func (l Logger) Debug(a ...interface{})
Debug formats using the default formats for its operands and writes to the configured debug writer. Spaces are added between operands when neither is a string.
func (Logger) DebugWriter ¶
DebugWriter returns the configured debug writer.
func (Logger) Debugf ¶ added in v1.6.0
Debugf formats according to a format specifier and writes to the configured debug writer.
func (Logger) Info ¶
func (l Logger) Info(a ...interface{})
Info formats using the default formats for its operands and writes to the configured info writer. Spaces are added between operands when neither is a string.
func (Logger) InfoWriter ¶
InfoWriter returns the configured info writer.
func (Logger) Infof ¶ added in v1.6.0
Infof formats according to a format specifier and writes to the configured info writer.
func (Logger) IsDebugEnabled ¶
IsDebugEnabled indicates whether debug logging is enabled.
func (Logger) IsInfoEnabled ¶
IsInfoEnabled indicates whether info logging is enabled.