logo

package
v0.0.0-...-d9922dd Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func AddHook

func AddHook(hook Hook)

func SetFormatter

func SetFormatter(formatter Formatter)

func SetLevel

func SetLevel(level Level)

func SetOutput

func SetOutput(output io.Writer)

func SetReportCaller

func SetReportCaller(reportCaller bool)

Types

type DefaultFieldsHook

type DefaultFieldsHook struct {
	Info runtimekit.StackTraceInfo
}

func (*DefaultFieldsHook) Fire

func (h *DefaultFieldsHook) Fire(entry *Entry) error

func (*DefaultFieldsHook) Levels

func (h *DefaultFieldsHook) Levels() []Level

type Entry

type Entry = logrus.Entry

func WithFields

func WithFields(fields Fields) *Entry

type Fields

type Fields = logrus.Fields

type Formatter

type Formatter = logrus.Formatter

type Hook

type Hook = logrus.Hook

type JSONFormatter

type JSONFormatter = logrus.JSONFormatter

type Level

type Level = logrus.Level
const (
	// PanicLevel level, highest level of severity. Logs and then calls panic with the
	// message passed to Debug, Info, ...
	PanicLevel Level = iota
	// FatalLevel level. Logs and then calls `logger.Exit(1)`. It will exit even if the
	// logging level is set to Panic.
	FatalLevel
	// ErrorLevel level. Logs. Used for errors that should definitely be noted.
	// Commonly used for hooks to send errors to an error tracking service.
	ErrorLevel
	// WarnLevel level. Non-critical entries that deserve eyes.
	WarnLevel
	// InfoLevel level. General operational entries about what's going on inside the
	// application.
	InfoLevel
	// DebugLevel level. Usually only enabled when debugging. Very verbose logging.
	DebugLevel
	// TraceLevel level. Designates finer-grained informational events than the Debug.
	TraceLevel
)

type Logger

type Logger = logrus.Logger

func Debug

func Debug(summary string, data any, message string) *Logger

func DebugF

func DebugF(summary string, data any, message string, a ...any) *Logger

func Error

func Error(summary string, data any, message string) *Logger

func ErrorF

func ErrorF(summary string, data any, message string, a ...any) *Logger

func Fatal

func Fatal(summary string, data any, message string) *Logger

func FatalF

func FatalF(summary string, data any, message string, a ...any) *Logger

func Info

func Info(summary string, data any, message string) *Logger

func InfoF

func InfoF(summary string, data any, message string, a ...any) *Logger

func Panic

func Panic(summary string, data any, message string) *Logger

func PanicF

func PanicF(summary string, data any, message string, a ...any) *Logger

func Trace

func Trace(summary string, data any, message string) *Logger

func TraceF

func TraceF(summary string, data any, message string, a ...any) *Logger

func Warn

func Warn(summary string, data any, message string) *Logger

func WarnF

func WarnF(summary string, data any, message string, a ...any) *Logger

type TextFormatter

type TextFormatter = logrus.TextFormatter

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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