logging

package
v0.0.0-...-9fedd22 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2015 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(t []string, args ...interface{})

func Debugf

func Debugf(t []string, s string, args ...interface{})

func Error

func Error(t []string, args ...interface{})

func Errorf

func Errorf(t []string, s string, args ...interface{})

func Info

func Info(t []string, args ...interface{})

func Infof

func Infof(t []string, s string, args ...interface{})

func SetLevel

func SetLevel(lv LogLevel)

func SetTags

func SetTags(t ...string)

func Verbose

func Verbose(t []string, args ...interface{})

func Verbosef

func Verbosef(t []string, s string, args ...interface{})

func Warn

func Warn(t []string, args ...interface{})

func Warnf

func Warnf(t []string, s string, args ...interface{})

Types

type LogLevel

type LogLevel uint8
const (
	VERBOSE LogLevel = iota
	DEBUG
	INFO
	WARN
	ERROR
)
const DEFAULT LogLevel = INFO

func LevelFromString

func LevelFromString(s string) LogLevel

type Logger

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

A super simple tagging logger, made to satisfy the design needs of Muta. Hopefully to be replaced in the future with a more mature logger of similar style.

func DefaultLogger

func DefaultLogger() *Logger

func NewLogger

func NewLogger(w io.Writer) *Logger

func (*Logger) Debug

func (l *Logger) Debug(t []string, args ...interface{})

func (*Logger) Debugf

func (l *Logger) Debugf(t []string, s string, args ...interface{})

func (*Logger) Error

func (l *Logger) Error(t []string, args ...interface{})

func (*Logger) Errorf

func (l *Logger) Errorf(t []string, s string, args ...interface{})

func (*Logger) Info

func (l *Logger) Info(t []string, args ...interface{})

func (*Logger) Infof

func (l *Logger) Infof(t []string, s string, args ...interface{})

func (*Logger) SetLevel

func (l *Logger) SetLevel(lv LogLevel)

Set the log level that this logger wil log

func (*Logger) SetTags

func (l *Logger) SetTags(tags ...string) error

Set the tags that this logger will log. All other tags are ignored

func (*Logger) Verbose

func (l *Logger) Verbose(t []string, args ...interface{})

func (*Logger) Verbosef

func (l *Logger) Verbosef(t []string, s string, args ...interface{})

func (*Logger) Warn

func (l *Logger) Warn(t []string, args ...interface{})

func (*Logger) Warnf

func (l *Logger) Warnf(t []string, s string, args ...interface{})

Jump to

Keyboard shortcuts

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