logging

package
v0.0.0-...-534e604 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogEntry

type LogEntry struct {
	Time     *time.Time
	Severity Severity
	Message  string
	Data     map[string]interface{}
}

func (*LogEntry) MarshalJSON

func (l *LogEntry) MarshalJSON() ([]byte, error)

type Logger

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

func NewLogger

func NewLogger(outw, errw io.Writer) *Logger

func (*Logger) Debug

func (l *Logger) Debug(msg string, fields ...interface{})

func (*Logger) Error

func (l *Logger) Error(msg string, fields ...interface{})

func (*Logger) Fatal

func (l *Logger) Fatal(msg string, fields ...interface{})

func (*Logger) Info

func (l *Logger) Info(msg string, fields ...interface{})

func (*Logger) Warn

func (l *Logger) Warn(msg string, fields ...interface{})

type Severity

type Severity string
const (
	SeverityDebug Severity = "DEBUG"
	SeverityInfo  Severity = "INFO"
	SeverityWarn  Severity = "WARNING"
	SeverityError Severity = "ERROR"
	SeverityFatal Severity = "EMERGENCY"
)

Jump to

Keyboard shortcuts

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