log

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2015 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(m string)

Debug records the supplied debug string

func Debugf

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

Debugf records the supplied Debug string including any arguments (i.e. Printf)

func Error

func Error(m string)

Error records the supplied Error string

func Errorf

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

Errorf records the supplied Error string including any arguments (i.e. Printf)

func Flush added in v0.2.0

func Flush()

Flush flushes the recorder

func Info

func Info(m string)

Info records the supplied Info string

func Infof

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

Infof records the supplied Info string including any arguments (i.e. Printf)

func Init

func Init(recorder Recorder)

Init initializes the recorder

func Warn

func Warn(m string)

Warn records the supplied Warn string

func Warnf

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

Warnf records the supplied Warn string including any arguments (i.e. Printf)

Types

type GlogRecorder

type GlogRecorder struct {
	Recorder
}

GlogRecorder struct contains the recorder

func (*GlogRecorder) Debug

func (l *GlogRecorder) Debug(m string)

Debug records the supplied debug string

func (*GlogRecorder) Error

func (l *GlogRecorder) Error(m string)

Error records the supplied error string

func (*GlogRecorder) Flush added in v0.2.0

func (l *GlogRecorder) Flush()

Flush flushes the recorder

func (*GlogRecorder) Info

func (l *GlogRecorder) Info(m string)

Info records the supplied Info string

func (*GlogRecorder) Warn

func (l *GlogRecorder) Warn(m string)

Warn records the supplied warn string

type Recorder

type Recorder interface {
	Info(m string)
	Debug(m string)
	Warn(m string)
	Error(m string)
	Flush()
}

Recorder is the recorder struct containing the associated functions

var GlobalRecorder Recorder = &GlogRecorder{}

GlobalRecorder is pointer to the global log recorder

Jump to

Keyboard shortcuts

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