Documentation ¶
Index ¶
- Variables
- func Debug(args ...interface{})
- func Debugf(fmtString string, args ...interface{})
- func Error(args ...interface{})
- func Errorf(fmtString string, args ...interface{})
- func Errorln(args ...interface{})
- func Fatal(args ...interface{})
- func Fatalf(fmtString string, args ...interface{})
- func Info(args ...interface{})
- func Infof(fmtString string, args ...interface{})
- func Infoln(args ...interface{})
- func Print(args ...interface{})
- func Printf(fmtString string, args ...interface{})
- func SetErrWriter(w io.Writer)
- func SetOutWriter(w io.Writer)
- func Warn(args ...interface{})
- func Warnf(fmtString string, args ...interface{})
- type Fields
- type Logger
- type StandardLogger
- func (t StandardLogger) Debug(args ...interface{})
- func (t StandardLogger) Debugf(fmtString string, args ...interface{})
- func (t StandardLogger) Error(args ...interface{})
- func (t StandardLogger) Errorf(fmtString string, args ...interface{})
- func (t StandardLogger) Errorln(args ...interface{})
- func (t StandardLogger) Fatal(args ...interface{})
- func (t StandardLogger) Fatalf(fmtString string, args ...interface{})
- func (t StandardLogger) Info(args ...interface{})
- func (t StandardLogger) Infof(fmtString string, args ...interface{})
- func (t StandardLogger) Infoln(args ...interface{})
- func (t StandardLogger) Print(args ...interface{})
- func (t StandardLogger) Printf(fmtString string, args ...interface{})
- func (t StandardLogger) Warn(args ...interface{})
- func (t StandardLogger) Warnf(fmtString string, args ...interface{})
- func (t StandardLogger) WithFields(fields Fields) Logger
Constants ¶
This section is empty.
Variables ¶
View Source
var (
IsDebug bool = false
)
Functions ¶
func SetErrWriter ¶
func SetOutWriter ¶
Types ¶
type Logger ¶
type Logger interface { Debug(...interface{}) Debugf(string, ...interface{}) Error(...interface{}) Errorf(string, ...interface{}) Info(...interface{}) Infof(string, ...interface{}) Fatal(...interface{}) Fatalf(string, ...interface{}) Print(...interface{}) Printf(string, ...interface{}) Warn(...interface{}) Warnf(string, ...interface{}) WithFields(Fields) Logger }
Why the interface? We may only want to print to STDOUT and STDERR for now, but it won't neccessarily be that way forever. This interface is intended to provide a "framework" for a variety of different logging types in the future (log to file, log to logstash, etc.) There could be a driver model similar to what is done with OS or machine providers.
func WithFields ¶
type StandardLogger ¶
type StandardLogger struct { OutWriter io.Writer ErrWriter io.Writer // contains filtered or unexported fields }
func (StandardLogger) Debug ¶
func (t StandardLogger) Debug(args ...interface{})
func (StandardLogger) Debugf ¶
func (t StandardLogger) Debugf(fmtString string, args ...interface{})
func (StandardLogger) Error ¶
func (t StandardLogger) Error(args ...interface{})
func (StandardLogger) Errorf ¶
func (t StandardLogger) Errorf(fmtString string, args ...interface{})
func (StandardLogger) Errorln ¶
func (t StandardLogger) Errorln(args ...interface{})
func (StandardLogger) Fatal ¶
func (t StandardLogger) Fatal(args ...interface{})
func (StandardLogger) Fatalf ¶
func (t StandardLogger) Fatalf(fmtString string, args ...interface{})
func (StandardLogger) Info ¶
func (t StandardLogger) Info(args ...interface{})
func (StandardLogger) Infof ¶
func (t StandardLogger) Infof(fmtString string, args ...interface{})
func (StandardLogger) Infoln ¶
func (t StandardLogger) Infoln(args ...interface{})
func (StandardLogger) Print ¶
func (t StandardLogger) Print(args ...interface{})
func (StandardLogger) Printf ¶
func (t StandardLogger) Printf(fmtString string, args ...interface{})
func (StandardLogger) Warn ¶
func (t StandardLogger) Warn(args ...interface{})
func (StandardLogger) Warnf ¶
func (t StandardLogger) Warnf(fmtString string, args ...interface{})
func (StandardLogger) WithFields ¶
func (t StandardLogger) WithFields(fields Fields) Logger
Click to show internal directories.
Click to hide internal directories.