log

package
v0.0.0-...-b94c5f0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2017 License: MIT Imports: 4 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Default = New(os.Stderr, "", 0)

Default shared instance.

Functions

func Debugf

func Debugf(format string, v ...interface{})

Debugf is an alias for Default.Debugf.

func Fatal

func Fatal(v ...interface{})

Fatal is an alias for Default.Fatal.

func Fatalf

func Fatalf(format string, v ...interface{})

Fatalf is an alias for Default.Fatalf.

func Print

func Print(v ...interface{})

Print is an alias for Default.Print.

func Printf

func Printf(format string, v ...interface{})

Printf is an alias for Default.Printf.

Types

type Logger

type Logger struct {
	*log.Logger
	Debug bool
}

Logger is our custom logger with Debugf method.

func New

func New(out io.Writer, prefix string, flag int) *Logger

New creates a new Logger.

func (*Logger) Debugf

func (l *Logger) Debugf(format string, args ...interface{})

Debugf prints message only when Logger Debug flag is set to true.

Jump to

Keyboard shortcuts

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