log

package
v0.4.0-rc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2015 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(args ...interface{})

func Debugf

func Debugf(fmtString string, args ...interface{})

func Error

func Error(args ...interface{})

func Errorf

func Errorf(fmtString string, args ...interface{})

func Errorln

func Errorln(args ...interface{})

func Fatal

func Fatal(args ...interface{})

func Fatalf

func Fatalf(fmtString string, args ...interface{})

func Info

func Info(args ...interface{})

func Infof

func Infof(fmtString string, args ...interface{})

func Infoln

func Infoln(args ...interface{})

func Print

func Print(args ...interface{})

func Printf

func Printf(fmtString string, args ...interface{})

func Warn

func Warn(args ...interface{})

func Warnf

func Warnf(fmtString string, args ...interface{})

Types

type Fields

type Fields map[string]interface{}

type Logger

type Logger interface {
	Debug(...interface{})
	Debugf(string, ...interface{})

	Error(...interface{})
	Errorf(string, ...interface{})
	Errorln(...interface{})

	Info(...interface{})
	Infof(string, ...interface{})
	Infoln(...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 WithField

func WithField(fieldName string, field interface{}) Logger

func WithFields

func WithFields(fields Fields) Logger

type TerminalLogger

type TerminalLogger struct {
	// contains filtered or unexported fields
}

func (TerminalLogger) Debug

func (t TerminalLogger) Debug(args ...interface{})

func (TerminalLogger) Debugf

func (t TerminalLogger) Debugf(fmtString string, args ...interface{})

func (TerminalLogger) Error

func (t TerminalLogger) Error(args ...interface{})

func (TerminalLogger) Errorf

func (t TerminalLogger) Errorf(fmtString string, args ...interface{})

func (TerminalLogger) Errorln

func (t TerminalLogger) Errorln(args ...interface{})

func (TerminalLogger) Fatal

func (t TerminalLogger) Fatal(args ...interface{})

func (TerminalLogger) Fatalf

func (t TerminalLogger) Fatalf(fmtString string, args ...interface{})

func (TerminalLogger) Info

func (t TerminalLogger) Info(args ...interface{})

func (TerminalLogger) Infof

func (t TerminalLogger) Infof(fmtString string, args ...interface{})

func (TerminalLogger) Infoln

func (t TerminalLogger) Infoln(args ...interface{})

func (TerminalLogger) Print

func (t TerminalLogger) Print(args ...interface{})

func (TerminalLogger) Printf

func (t TerminalLogger) Printf(fmtString string, args ...interface{})

func (TerminalLogger) Warn

func (t TerminalLogger) Warn(args ...interface{})

func (TerminalLogger) Warnf

func (t TerminalLogger) Warnf(fmtString string, args ...interface{})

func (TerminalLogger) WithFields

func (t TerminalLogger) WithFields(fields Fields) Logger

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL