logging

package
v0.0.0-...-68e8b16 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContextLogger

type ContextLogger struct {
	Context string
	// contains filtered or unexported fields
}

func NewContextLogger

func NewContextLogger(lw LogWriter, context string) *ContextLogger

func (*ContextLogger) Debug

func (cl *ContextLogger) Debug(message string)

func (*ContextLogger) Debugf

func (cl *ContextLogger) Debugf(format string, params ...any)

func (*ContextLogger) Error

func (cl *ContextLogger) Error(err error, message string)

func (*ContextLogger) Errorf

func (cl *ContextLogger) Errorf(err error, format string, params ...any)

func (*ContextLogger) Fatal

func (cl *ContextLogger) Fatal(err error, message string)

func (*ContextLogger) Fatalf

func (cl *ContextLogger) Fatalf(err error, format string, params ...any)

func (*ContextLogger) Info

func (cl *ContextLogger) Info(message string)

func (*ContextLogger) Infof

func (cl *ContextLogger) Infof(format string, params ...any)

func (*ContextLogger) Warn

func (cl *ContextLogger) Warn(message string)

func (*ContextLogger) Warnf

func (cl *ContextLogger) Warnf(format string, params ...any)

type JsonLogWriter

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

func NewJsonLogWriter

func NewJsonLogWriter(out io.Writer, minLevel Level) *JsonLogWriter

type Level

type Level int8
const (
	INFO Level = iota
	WARN
	DEBUG
	ERROR
	FATAL
	OFF
)

func (Level) String

func (l Level) String() string

type LogWriter

type LogWriter interface {
	// contains filtered or unexported methods
}

type Logger

type Logger interface {
	Info(message string)
	Infof(format string, params ...any)
	Warn(message string)
	Warnf(format string, params ...any)
	Debug(message string)
	Debugf(format string, params ...any)
	Error(err error, message string)
	Errorf(err error, format string, params ...any)
	Fatal(err error, message string)
	Fatalf(err error, format string, params ...any)
}

type TextLogWriter

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

func NewTextLogWriter

func NewTextLogWriter(out io.Writer, minLevel Level) *TextLogWriter

Jump to

Keyboard shortcuts

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