logger

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InfoLevelReadable      = "INFO"
	DebugLevelReadable     = "DEBUG"
	WarningLevelReadable   = "WARNING"
	ErrorLevelReadable     = "ERROR"
	CriticalLevelReadable  = "CRITICAL"
	EmergencyLevelReadable = "EMERGENCY"
	InfoLevel              = iota
	DebugLevel
	WarningLevel
	ErrorLevel
	CriticalLevel
	EmergencyLevel

	DebugLogType = "debug"
	InfoLogType  = "info"
	ErrorLogType = "error"
)

Variables

This section is empty.

Functions

func ToLevel

func ToLevel(readableLevel string) int

func ToReadableLevel

func ToReadableLevel(err introspectedError) string

Types

type LoggableError

type LoggableError interface {
	Error() string
	Level() int
}

type RequestIdAware

type RequestIdAware interface {
	RequestID() string
	SetRequestID(id string)
}

type StdOut

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

func NewStdOut

func NewStdOut(ctx context.Context, errBuff int, reqBuff int) (logger *StdOut, closeFunc func())

func (StdOut) Close

func (l StdOut) Close() (closeFunc func())

func (StdOut) Context

func (l StdOut) Context() context.Context

func (StdOut) Critical

func (l StdOut) Critical(strOrErr any)

func (StdOut) CriticalPropagate

func (l StdOut) CriticalPropagate(strOrErr any) error

func (StdOut) Debug

func (l StdOut) Debug(strOrErr any)

func (StdOut) DebugPropagate

func (l StdOut) DebugPropagate(strOrErr any) error

func (StdOut) Emergency

func (l StdOut) Emergency(strOrErr any)

func (StdOut) EmergencyPropagate

func (l StdOut) EmergencyPropagate(strOrErr any) error

func (StdOut) Error

func (l StdOut) Error(strOrErr any)

func (StdOut) ErrorPropagate

func (l StdOut) ErrorPropagate(strOrErr any) error

func (StdOut) Info

func (l StdOut) Info(strOrErr any)

func (StdOut) InfoPropagate

func (l StdOut) InfoPropagate(strOrErr any) error

func (StdOut) Log

func (l StdOut) Log(err error)

func (StdOut) LogData

func (l StdOut) LogData(data any)

func (StdOut) LogPropagate

func (l StdOut) LogPropagate(err error) error

func (StdOut) SetContext

func (l StdOut) SetContext(ctx context.Context)

func (StdOut) SetOutput

func (l StdOut) SetOutput(w io.Writer)

func (StdOut) Warning

func (l StdOut) Warning(strOrErr any)

func (StdOut) WarningPropagate

func (l StdOut) WarningPropagate(strOrErr any) error

func (StdOut) Writer

func (l StdOut) Writer() io.Writer

Jump to

Keyboard shortcuts

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