basiclog

package
v0.0.0-...-d423214 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2021 License: Apache-2.0, Apache-2.0 Imports: 14 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OutputStdout = logdestination_stdio.NewStdOut()
	OutputStderr = logdestination_stdio.NewStdErr()
)

Functions

func Debug

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

func Error

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

func Fatal

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

func Warn

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

Types

type LL_Type

type LL_Type uint64
const (
	LL_Fatal LL_Type = 1 << iota //
	LL_Error                     //
	LL_Warn                      //
	LL_Debug                     //

	LL_END
	LL_All   = LL_END - 1
	LL_Count = 4
)

func (LL_Type) BitAnd

func (ll LL_Type) BitAnd(l2 LL_Type) LL_Type

func (LL_Type) BitClear

func (ll LL_Type) BitClear(l2 LL_Type) LL_Type

func (LL_Type) BitOr

func (ll LL_Type) BitOr(l2 LL_Type) LL_Type

func (LL_Type) BitTest

func (ll LL_Type) BitTest(l2 LL_Type) bool

func (LL_Type) BitXor

func (ll LL_Type) BitXor(l2 LL_Type) LL_Type

func (LL_Type) IsLastLevel

func (ll LL_Type) IsLastLevel() bool

func (LL_Type) IsLevel

func (ll LL_Type) IsLevel(l2 LL_Type) bool

func (LL_Type) LevelsString

func (ll LL_Type) LevelsString() string

func (LL_Type) NextLevel

func (ll LL_Type) NextLevel(n uint) LL_Type

func (LL_Type) PreLevel

func (ll LL_Type) PreLevel(n uint) LL_Type

func (LL_Type) StartLevel

func (ll LL_Type) StartLevel() LL_Type

func (LL_Type) String

func (ll LL_Type) String() string

func (LL_Type) TestAt

func (ll LL_Type) TestAt(n int) bool

type LogBase

type LogBase struct {
	// contains filtered or unexported fields
}
var GlobalLogger *LogBase

////////////////////////////////////////////////////////////////

func New

func New(prefix string, lf logflagi.LogFlagI, lv LL_Type) *LogBase

func NewWithDstDir

func NewWithDstDir(prefix string, logdir string, lf logflagi.LogFlagI,
	loglevel LL_Type, splitLogLevel LL_Type) (*LogBase, error)

func (*LogBase) AddDestination

func (lg *LogBase) AddDestination(
	ll LL_Type, o logdestinationi.LogDestinationI)

func (*LogBase) Debug

func (l *LogBase) Debug(format string, v ...interface{})

func (*LogBase) DelDestination

func (lg *LogBase) DelDestination(
	ll LL_Type, o logdestinationi.LogDestinationI)

func (*LogBase) Error

func (l *LogBase) Error(format string, v ...interface{})

func (*LogBase) Fatal

func (l *LogBase) Fatal(format string, v ...interface{})

func (*LogBase) Format2Bytes

func (lg *LogBase) Format2Bytes(calldepth int, ll LL_Type,
	format string, v ...interface{}) []byte

func (*LogBase) GetFlags

func (lg *LogBase) GetFlags() logflagi.LogFlagI

Flags returns the output flags for the logger.

func (*LogBase) GetLevel

func (lg *LogBase) GetLevel() LL_Type

func (*LogBase) GetPrefix

func (lg *LogBase) GetPrefix() string

Prefix returns the output prefix for the logger.

func (*LogBase) LogPrintf

func (lg *LogBase) LogPrintf(calldepth int, ll LL_Type,
	format string, v ...interface{}) ([]byte, error)

func (*LogBase) Output

func (lg *LogBase) Output(ll LL_Type, b []byte) error

func (*LogBase) Reload

func (lg *LogBase) Reload() error

func (*LogBase) SetFlags

func (lg *LogBase) SetFlags(flag logflagi.LogFlagI)

SetFlags sets the output flags for the logger.

func (*LogBase) SetLevel

func (lg *LogBase) SetLevel(level LL_Type)

func (*LogBase) SetPrefix

func (lg *LogBase) SetPrefix(p string)

func (*LogBase) String

func (lg *LogBase) String() string

func (*LogBase) Warn

func (l *LogBase) Warn(format string, v ...interface{})

Jump to

Keyboard shortcuts

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