logger

package
v0.0.0-...-23da319 Latest Latest
Warning

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

Go to latest
Published: May 19, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// We use +2 to avoid conflict with zapcore levels. So debug start with 1 and fatal end with 7
	// DebugLevel logs are typically voluminous, and are usually disabled in production.
	DebugLevel = zapcore.DebugLevel + 2
	// InfoLevel is the default logging priority.
	InfoLevel = zapcore.InfoLevel + 2
	// WarnLevel logs are more important than Info, but don't need individual human review.
	WarnLevel = zapcore.WarnLevel + 2
	// ErrorLevel logs are high-priority. If an application is running smoothly, it shouldn't generate any error-level logs.
	ErrorLevel = zapcore.ErrorLevel + 2
	// DPanicLevel logs are particularly important errors. In development the logger panics after writing the message.
	DPanicLevel = zapcore.DPanicLevel + 2
	// PanicLevel logs a message, then panics.
	PanicLevel = zapcore.PanicLevel + 2
	// FatalLevel logs a message, then calls os.Exit(1).
	FatalLevel = zapcore.FatalLevel + 2
)

Variables

This section is empty.

Functions

func ForceLog

func ForceLog(template string, args ...any)

func InitLogger

func InitLogger(level int) *zap.Logger

Types

This section is empty.

Jump to

Keyboard shortcuts

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