tracelog

package module
v0.0.0-...-f44417f Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

README

tracelog

Documentation

Index

Constants

This section is empty.

Variables

Functions

func GetErrorFormatter

func GetErrorFormatter() string

func NewLogger

func NewLogger(out io.Writer, loggerType LoggerType) *logger

func SetOnFatalFunc

func SetOnFatalFunc(onFatal func(format string, v ...interface{}))

func SetOnPanicFunc

func SetOnPanicFunc(onPanic func(format string, v ...interface{}))

func UpdateLogLevel

func UpdateLogLevel(newLevel LogLevel) error

Types

type BasicLogger

type BasicLogger interface {
	Output(calldepth int, s string) error
	Writer() io.Writer
	SetOutput(w io.Writer)
	Flags() int
	SetFlags(flag int)
	Prefix() string
	SetPrefix(prefix string)
	Print(v ...interface{})
	Printf(format string, v ...interface{})
	Println(v ...interface{})
}

BasicLogger represents the logger without the panic and fatal methods

type LogLevel

type LogLevel string
const (
	NormalLogLevel LogLevel = "NORMAL"
	DevelLogLevel  LogLevel = "DEVEL"
	ErrorLogLevel  LogLevel = "ERROR"
)

type LogLevelError

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

func NewLogLevelError

func NewLogLevelError() LogLevelError

func (LogLevelError) Error

func (err LogLevelError) Error() string

type LoggerType

type LoggerType string
const (
	InfoLoggerType    LoggerType = "INFO"
	WarningLoggerType LoggerType = "WARNING"
	ErrorLoggerType   LoggerType = "ERROR"
	DebugLoggerType   LoggerType = "DEBUG"
)

Jump to

Keyboard shortcuts

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