log

package
v0.3.0-dev Latest Latest
Warning

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

Go to latest
Published: May 21, 2015 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Progress = NewProgress()
)

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 Progressor

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

func NewProgress

func NewProgress() *Progressor

func (*Progressor) Start

func (p *Progressor) Start(msg string)

invoke with: 'log.Progress.Start("some description")'

func (*Progressor) Stop

func (p *Progressor) Stop()

invoke with: 'log.Progress.Stop()'

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