rlog

package
v0.0.0-...-bac8e5f Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2021 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CtxId

func CtxId(ctx context.Context) string

func Middleware_installRLog

func Middleware_installRLog(handle http.HandlerFunc) http.HandlerFunc

func SetCtxIdGenerator

func SetCtxIdGenerator(fn func(*http.Request) string)

Types

type Log

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

func DefLog

func DefLog() *Log

func GetLog

func GetLog(name string) *Log

func New

func New(name string) *Log

func (*Log) Debug

func (g *Log) Debug(ctx context.Context, vals ...interface{})

func (*Log) Error

func (g *Log) Error(ctx context.Context, vals ...interface{})

func (*Log) Info

func (g *Log) Info(ctx context.Context, vals ...interface{})

func (*Log) Warning

func (g *Log) Warning(ctx context.Context, vals ...interface{})

type LogFunc

type LogFunc func(ctx context.Context, vals ...interface{})
var (
	Debug   LogFunc = stdLogFunc
	Info    LogFunc = stdLogFunc
	Warning LogFunc = stdLogFunc
	Error   LogFunc = stdLogFunc
)

type LogLevel

type LogLevel int
const (
	LEVEL_DEBUG LogLevel = iota - 1
	LEVEL_INFO
	LEVEL_WARNING
	LEVEL_ERROR
)

Jump to

Keyboard shortcuts

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