xlog

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Ldate         = log.Ldate
	Ltime         = log.Ltime
	Lmicroseconds = log.Lmicroseconds
	Llongfile     = log.Llongfile
	Lshortfile    = log.Lshortfile
	Lmodule       = log.Lmodule
	Llevel        = log.Llevel
	LstdFlags     = log.LstdFlags
	Ldefault      = log.Ldefault
)
View Source
const (
	Ldebug = log.Ldebug
	Linfo  = log.Linfo
	Lwarn  = log.Lwarn
	Lerror = log.Lerror
	Lpanic = log.Lpanic
	Lfatal = log.Lfatal
)

Variables

This section is empty.

Functions

func SetFlags

func SetFlags(flag int)

func SetOutput

func SetOutput(w io.Writer)

func SetOutputLevel

func SetOutputLevel(lvl int)

Types

type Logger

type Logger struct {
	ReqId string
}

func New

func New(reqId string) *Logger

func NewWith

func NewWith(ctx Context) *Logger

func (*Logger) Debug

func (xlog *Logger) Debug(v ...interface{})

func (*Logger) Debugf

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

func (*Logger) Error

func (xlog *Logger) Error(v ...interface{})

func (*Logger) Errorf

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

func (*Logger) Fatal

func (xlog *Logger) Fatal(v ...interface{})

Fatal is equivalent to Print() followed by a call to os.Exit(1).

func (*Logger) Fatalf

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

Fatalf is equivalent to Printf() followed by a call to os.Exit(1).

func (*Logger) Fatalln

func (xlog *Logger) Fatalln(v ...interface{})

Fatalln is equivalent to Println() followed by a call to os.Exit(1).

func (*Logger) Info

func (xlog *Logger) Info(v ...interface{})

func (*Logger) Infof

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

func (*Logger) Panic

func (xlog *Logger) Panic(v ...interface{})

Panic is equivalent to Print() followed by a call to panic().

func (*Logger) Panicf

func (xlog *Logger) Panicf(format string, v ...interface{})

Panicf is equivalent to Printf() followed by a call to panic().

func (*Logger) Panicln

func (xlog *Logger) Panicln(v ...interface{})

Panicln is equivalent to Println() followed by a call to panic().

func (*Logger) Print

func (xlog *Logger) Print(v ...interface{})

Print calls Output to print to the standard Logger. Arguments are handled in the manner of fmt.Print.

func (*Logger) Printf

func (xlog *Logger) Printf(format string, v ...interface{})

Printf calls Output to print to the standard Logger. Arguments are handled in the manner of fmt.Printf.

func (*Logger) Println

func (xlog *Logger) Println(v ...interface{})

Println calls Output to print to the standard Logger. Arguments are handled in the manner of fmt.Println.

func (*Logger) SingleStack

func (xlog *Logger) SingleStack(v ...interface{})

func (*Logger) Spawn

func (xlog *Logger) Spawn(child string) *Logger

func (*Logger) Stack

func (xlog *Logger) Stack(v ...interface{})

func (*Logger) Warn

func (xlog *Logger) Warn(v ...interface{})

func (*Logger) Warnf

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

Jump to

Keyboard shortcuts

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