logger

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

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

Go to latest
Published: Feb 26, 2023 License: MIT Imports: 1 Imported by: 0

README

logger

Documentation

Index

Constants

View Source
const (
	LogErrKey  = "err"
	LogRespKey = "response"
	LogObjKey  = "obj"
)
View Source
const (
	DomainJSONKey = "domain"
	LayerJSONKey  = "layer"
	MethodJSONKey = "method"
	TraceJSONKey  = "trace"
	LevelJSONKey  = "level"
	FileJSONKey   = "file"
	LineJSONKey   = "line"
	CallerJSONKey = "caller"
)

Variables

This section is empty.

Functions

func Caller

func Caller() (name, file string, line int)

Types

type Args

type Args map[string]any

type Domain

type Domain string

type Layer

type Layer uint8
const (
	UnsetLayer Layer = iota
	StorageLayer
	ServiceLayer
	TransportLayer
)

func (Layer) String

func (l Layer) String() string

type Level

type Level uint8
const (
	UnsetLevel Level = iota
	InfoLevel
	NoticeLevel
	DebugLevel
	DeepDebugLevel
	WarningLevel
	ErrorLevel
	AlertLevel
	PanicLevel
	CriticalLevel
	EmergencyLevel
	FatalLevel
	SecurityLevel
	ConfidentialLevel
)

func (Level) String

func (l Level) String() string

type Logger

type Logger interface {
	PanicHandler()
	Info(Domain, Layer, Args)
	Error(Domain, Layer, error, Args)
	Panic(Domain, Layer, Args)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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