Documentation ¶
Index ¶
- type Level
- type Log
- type Logger
- func (l *Logger) Close()
- func (l *Logger) Criticalf(format string, a ...interface{})
- func (l *Logger) Debugf(format string, a ...interface{})
- func (l *Logger) Errorf(format string, a ...interface{})
- func (l *Logger) Infof(format string, a ...interface{})
- func (l *Logger) Warnf(format string, a ...interface{})
- type PrefixLogger
- func (l *PrefixLogger) Close()
- func (l *PrefixLogger) Criticalf(format string, a ...interface{})
- func (l *PrefixLogger) Debugf(format string, a ...interface{})
- func (l *PrefixLogger) Errorf(format string, a ...interface{})
- func (l *PrefixLogger) Infof(format string, a ...interface{})
- func (l *PrefixLogger) Warnf(format string, a ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Level ¶
type Level int
const ( LevelDebug Level = iota // information that only a programmer will understand LevelInfo // information that a non-programmer might be interested in LevelWarn // speeds up tracking down issues, once you know about them LevelError // should not have happened LevelCritical // wake somebody up )
type Log ¶
type Log interface { Close() // Give logger a chance to flush Debugf(format string, a ...interface{}) Infof(format string, a ...interface{}) Warnf(format string, a ...interface{}) Errorf(format string, a ...interface{}) Criticalf(format string, a ...interface{}) }
func NewTestingLog ¶
type Logger ¶
type PrefixLogger ¶
PrefixLogger writes to the underlying log, but all messages are prefixed with a string of your choice
func NewPrefixLogger ¶
func NewPrefixLogger(log Log, prefix string) *PrefixLogger
Create a new PrefixLogger
func NewPrefixLoggerNoSpace ¶
func NewPrefixLoggerNoSpace(log Log, prefix string) *PrefixLogger
Create a new PrefixLogger, but don't add a space onto 'prefix'
func (*PrefixLogger) Close ¶
func (l *PrefixLogger) Close()
func (*PrefixLogger) Criticalf ¶
func (l *PrefixLogger) Criticalf(format string, a ...interface{})
func (*PrefixLogger) Debugf ¶
func (l *PrefixLogger) Debugf(format string, a ...interface{})
func (*PrefixLogger) Errorf ¶
func (l *PrefixLogger) Errorf(format string, a ...interface{})
func (*PrefixLogger) Infof ¶
func (l *PrefixLogger) Infof(format string, a ...interface{})
func (*PrefixLogger) Warnf ¶
func (l *PrefixLogger) Warnf(format string, a ...interface{})
Click to show internal directories.
Click to hide internal directories.