log

package
v0.0.0-...-18b418f Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QUIET   = -1
	DEFAULT = 0
	DEBUG   = 1
	TRACE   = 2
)

Variables

View Source
var Error *log.Logger
View Source
var ErrorCatcher *log.Logger
View Source
var Info *log.Logger
View Source
var Warning *log.Logger

Functions

func ApiLogger

func ApiLogger(logLevel int) gin.HandlerFunc

func ErrTrace

func ErrTrace(err error, extras ...string)

func SetLogLevel

func SetLogLevel(level int)

func ShowErr

func ShowErr(err error, extras ...string)

Types

type Logger

type Logger interface {
	Printf(format string, v ...any)
	Println(v ...any)
}
var Debug Logger = emptyLogger{}
var Trace Logger = emptyLogger{}

type StackError

type StackError interface {
	Error() string
	Stack() string
	Errorln() string
}

Jump to

Keyboard shortcuts

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