bclog

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Llongfile uint32 = 1 << iota
	Lshortfile
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

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

func NewBackend

func NewBackend(w io.Writer, opts ...BackendOption) *Backend

func (*Backend) Logger

func (b *Backend) Logger(subsystemTag string) Logger

type BackendOption

type BackendOption func(b *Backend)

func WithFlags

func WithFlags(flags uint32) BackendOption

type Level

type Level uint32
const (
	LevelTrace Level = iota
	LevelDebug
	LevelInfo
	LevelWarn
	LevelError
	LevelFatal
	LevelOff
)

func LevelFromString

func LevelFromString(s string) (l Level, ok bool)

func (Level) String

func (l Level) String() string

type Logger

type Logger interface {
	Tracef(format string, params ...interface{})
	Debugf(format string, params ...interface{})
	Infof(format string, params ...interface{})
	Warnf(format string, params ...interface{})
	Errorf(format string, params ...interface{})
	Fatalf(format string, params ...interface{})

	Trace(params ...interface{})
	Debug(params ...interface{})
	Info(params ...interface{})
	Warn(params ...interface{})
	Error(params ...interface{})
	Fatal(params ...interface{})

	Level() Level
	SetLevel(level Level)
}
var Disabled Logger

Jump to

Keyboard shortcuts

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