log

package
v0.0.0-...-c5655c4 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2017 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Errorf

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

Errorf is a wrapper for printf at error level.

func Fatalf

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

Fatalf is equivalent to Printf() followed by a call to os.Exit(1).

func Printf

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

Printf ..

Types

type Level

type Level uint8

Level is the logging level.

const (
	// Critical ..
	Critical Level = iota
	// Error ..
	Error
	// Warn ..
	Warn
	// Info ..
	Info
	// Debug ..
	Debug
)

type Logger

type Logger struct {
	*log.Logger
	// contains filtered or unexported fields
}

Logger ..

func New

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

New ..

func (*Logger) Debug

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

Debug ..

func (*Logger) Error

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

Error ..

func (*Logger) Info

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

Info ..

func (*Logger) WithLevel

func (l *Logger) WithLevel(level Level) *Logger

WithLevel set the logging level.

Jump to

Keyboard shortcuts

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