xlog

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: Apache-2.0 Imports: 11 Imported by: 3

Documentation

Index

Constants

View Source
const (
	DEBUG = 1
	INFO  = 2
	WARN  = 3
	ERROR = 4
)

Variables

This section is empty.

Functions

func Cause

func Cause(err error) error

func Debug

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

func Error

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

func HandlerFunc

func HandlerFunc(preStr string) gin.HandlerFunc

func Info

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

func InitLog

func InitLog(filePath string, level int)

func LogError

func LogError(err error)

func New

func New(msg string, causes ...string) error

func StackTrace

func StackTrace(skip int) string

func Warn

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

func Wrap

func Wrap(err error, causes ...string) error

Types

type Log

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

func DefaultLog

func DefaultLog(logFile string, level int) *Log

func (*Log) Debug

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

func (*Log) Error

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

func (*Log) HandlerFunc

func (logger *Log) HandlerFunc(preStr string) gin.HandlerFunc

func (*Log) Info

func (logger *Log) Info(format string, v ...interface{})
func (logger *Log) Link()

func (*Log) PreCheck

func (logger *Log) PreCheck()

func (*Log) Warn

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

type LogFormat

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

Jump to

Keyboard shortcuts

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