opt

package
Version: v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInternalLog

func NewInternalLog(p Printfer, rate, interval int64) *internalLog

func SetErrLog

func SetErrLog(errLog Printfer)

func SetInfoLog

func SetInfoLog(infoLog Printfer)

Types

type LogE

type LogE struct {
	Time     time.Time              `json:"time,omitempty"`
	Level    string                 `json:"level,omitempty"`
	SrcFile  string                 `json:"srcf,omitempty"`
	Line     int                    `json:"line,omitempty"`
	FuncName string                 `json:"func,omitempty"`
	Msg      string                 `json:"msg,omitempty"`
	Marker   string                 `json:"marker,omitempty"`
	Err      error                  `json:"error,omitempty"`
	Fields   map[string]interface{} `json:"fields,omitempty"`
}

type LogFunc

type LogFunc func(e *LogE)

type Printfer

type Printfer interface {
	Printf(format string, v ...interface{})
}

func GetErrLog

func GetErrLog() Printfer

func GetInfoLog

func GetInfoLog() Printfer

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL