tblog

package
v0.0.0-...-1256235 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(v ...interface{})

func Debugf

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

func Error

func Error(v ...interface{})

func Errorf

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

func Fatal

func Fatal(v ...interface{})

func Fatalf

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

func Info

func Info(v ...interface{})

func Infof

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

func Printf

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

func Println

func Println(level Level, v ...interface{})

func SetFlags

func SetFlags(flag int)

func SetLevel

func SetLevel(level Level)

func SetOutput

func SetOutput(out io.Writer)

func Trace

func Trace(v ...interface{})

func Tracef

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

func Warn

func Warn(v ...interface{})

func Warnf

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

Types

type Level

type Level int
const (
	LevelNull  Level = 0
	LevelTrace Level = 1
	LevelDebug Level = 2
	LevelInfo  Level = 3
	LevelWarn  Level = 4
	LevelError Level = 5
	LevelFatal Level = 6
)

func ParseLevel

func ParseLevel(levelS string) (Level, error)

type TbLog

type TbLog struct {
	// contains filtered or unexported fields
}
var (
	DefaultLog *TbLog

	ErrUnsupportedLogLevel = errors.New("unsupported log level")
)

func NewTbLog

func NewTbLog() *TbLog

func WithFlags

func WithFlags(flag int) *TbLog

func WithLevel

func WithLevel(level Level) *TbLog

func WithOutput

func WithOutput(out io.Writer) *TbLog

func (*TbLog) Debug

func (tblog *TbLog) Debug(v ...interface{})

func (*TbLog) Debugf

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

func (*TbLog) Error

func (tblog *TbLog) Error(v ...interface{})

func (*TbLog) Errorf

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

func (*TbLog) Fatal

func (tblog *TbLog) Fatal(v ...interface{})

func (*TbLog) Fatalf

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

func (*TbLog) Info

func (tblog *TbLog) Info(v ...interface{})

func (*TbLog) Infof

func (tblog *TbLog) Infof(format string, v ...interface{})

func (*TbLog) Printf

func (tblog *TbLog) Printf(level Level, format string, v ...interface{})

func (*TbLog) Println

func (tblog *TbLog) Println(level Level, v ...interface{})

func (*TbLog) SetFlags

func (tblog *TbLog) SetFlags(flag int)

func (*TbLog) SetLevel

func (tblog *TbLog) SetLevel(level Level)

func (*TbLog) SetOutput

func (tblog *TbLog) SetOutput(out io.Writer)

func (*TbLog) Trace

func (tblog *TbLog) Trace(v ...interface{})

func (*TbLog) Tracef

func (tblog *TbLog) Tracef(format string, v ...interface{})

func (*TbLog) Warn

func (tblog *TbLog) Warn(v ...interface{})

func (*TbLog) Warnf

func (tblog *TbLog) Warnf(format string, v ...interface{})

func (*TbLog) WithFlags

func (tblog *TbLog) WithFlags(flag int) *TbLog

func (*TbLog) WithLevel

func (tblog *TbLog) WithLevel(level Level) *TbLog

func (*TbLog) WithOutput

func (tblog *TbLog) WithOutput(out io.Writer) *TbLog

type TbLogOtto

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

func NewTbLogOtto

func NewTbLogOtto(tblog *TbLog) *TbLogOtto

func (*TbLogOtto) Debug

func (log *TbLogOtto) Debug(call otto.FunctionCall) otto.Value

func (*TbLogOtto) Debugf

func (log *TbLogOtto) Debugf(call otto.FunctionCall) otto.Value

func (*TbLogOtto) Error

func (log *TbLogOtto) Error(call otto.FunctionCall) otto.Value

func (*TbLogOtto) Fatal

func (log *TbLogOtto) Fatal(call otto.FunctionCall) otto.Value

func (*TbLogOtto) Info

func (log *TbLogOtto) Info(call otto.FunctionCall) otto.Value

func (*TbLogOtto) Trace

func (log *TbLogOtto) Trace(call otto.FunctionCall) otto.Value

func (*TbLogOtto) Tracef

func (log *TbLogOtto) Tracef(call otto.FunctionCall) otto.Value

func (*TbLogOtto) Warn

func (log *TbLogOtto) Warn(call otto.FunctionCall) otto.Value

Jump to

Keyboard shortcuts

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