log

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2019 License: MIT Imports: 4 Imported by: 3

README

log

light logger package with verbosity level

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPrefix

func AddPrefix(prefix string)

func Debugf

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

func Debugln

func Debugln(args ...interface{})

func Errorf

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

func Errorln

func Errorln(args ...interface{})

func Fatalf

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

func Fatalln

func Fatalln(args ...interface{})

func Infof

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

func Infoln

func Infoln(args ...interface{})

func Panicf

func Panicf(format string, args ...interface{})

func Panicln

func Panicln(args ...interface{})

func Prefix

func Prefix() string

func SetFlags

func SetFlags(flag int)

func SetOutput

func SetOutput(w io.Writer)

func SetPrefix

func SetPrefix(prefix string)

func SetVerbosity

func SetVerbosity(lvl Verbosity)

func Warningf

func Warningf(format string, args ...interface{})

func Warningln

func Warningln(args ...interface{})

Types

type Logger

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

func Copy

func Copy() *Logger

func New

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

func (*Logger) AddPrefix

func (l *Logger) AddPrefix(prefix string)

func (*Logger) Copy

func (l *Logger) Copy() *Logger

func (*Logger) Debugf

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

func (*Logger) Debugln

func (l *Logger) Debugln(args ...interface{})

func (*Logger) Errorf

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

func (*Logger) Errorln

func (l *Logger) Errorln(args ...interface{})

func (*Logger) Fatalf

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

func (*Logger) Fatalln

func (l *Logger) Fatalln(args ...interface{})

func (*Logger) Infof

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

func (*Logger) Infoln

func (l *Logger) Infoln(args ...interface{})

func (*Logger) Panicf

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

func (*Logger) Panicln

func (l *Logger) Panicln(args ...interface{})

func (*Logger) Prefix

func (l *Logger) Prefix() string

func (*Logger) SetFlags

func (l *Logger) SetFlags(flag int)

func (*Logger) SetOutput

func (l *Logger) SetOutput(w io.Writer)

func (*Logger) SetPrefix

func (l *Logger) SetPrefix(prefix string)

func (*Logger) SetVerbosity

func (l *Logger) SetVerbosity(lvl Verbosity)

func (*Logger) Verbosity

func (l *Logger) Verbosity() Verbosity

func (*Logger) Warningf

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

func (*Logger) Warningln

func (l *Logger) Warningln(args ...interface{})

type Verbosity

type Verbosity uint8
const (
	Error Verbosity = iota
	Warning
	Info
	Debug
)

Jump to

Keyboard shortcuts

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