structuredlogger

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: MIT Imports: 0 Imported by: 2

Documentation

Index

Constants

View Source
const (
	StdLoggerType    = "std"
	LogrusLoggerType = "logrus"
	ZapLoggerType    = "zap"
	CharmLoggerType  = "charm"
)

Logger Types

View Source
const (
	TextFormat = "text"
	JSONFormat = "json"
)

Logger Formats

View Source
const (
	DebugLevel = "debug"
	InfoLevel  = "info"
	WarnLevel  = "warn"
	ErrorLevel = "error"
	FatalLevel = "fatal"
)

Logger Levels

Variables

This section is empty.

Functions

This section is empty.

Types

type StructuredLogger

type StructuredLogger interface {
	Debug(msg string, keysAndValues ...interface{})
	Info(msg string, keysAndValues ...interface{})
	Warn(msg string, keysAndValues ...interface{})
	Error(msg string, keysAndValues ...interface{})
	Fatal(msg string, keysAndValues ...interface{})
	SetFormat(format string)
	SetLevel(level string)
}

StructuredLogger is a generic interface for logging with different loggers.

Jump to

Keyboard shortcuts

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