logo

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2023 License: Apache-2.0 Imports: 5 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 struct {
	logrus.Logger
}

func D added in v1.2.0

func D(message ...any) *Logger

func Debug

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

func Debugf added in v1.1.0

func Debugf(summary string, data any, format string, a ...any) *Logger

func Df added in v1.2.0

func Df(format string, a ...any) *Logger

func E added in v1.2.0

func E(message ...any) *Logger

func Ef added in v1.2.0

func Ef(format string, a ...any) *Logger

func Error

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

func Errorf added in v1.1.0

func Errorf(summary string, data any, format string, a ...any) *Logger

func F added in v1.2.0

func F(message ...any) *Logger

func Fatal

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

func Fatalf added in v1.1.0

func Fatalf(summary string, data any, format string, a ...any) *Logger

func Ff added in v1.2.0

func Ff(format string, a ...any) *Logger

func I added in v1.2.0

func I(message ...any) *Logger

func If added in v1.2.0

func If(format string, a ...any) *Logger

func Info

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

func Infof added in v1.1.0

func Infof(summary string, data any, format string, a ...any) *Logger

func P added in v1.2.0

func P(message ...any) *Logger

func Panic

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

func Panicf added in v1.1.0

func Panicf(summary string, data any, format string, a ...any) *Logger

func Pf added in v1.2.0

func Pf(format string, a ...any) *Logger

func T added in v1.2.0

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

func Tf added in v1.2.0

func Tf(summary string, data any, format string, a ...any) *Logger

func Trace

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

func Tracef added in v1.1.0

func Tracef(summary string, data any, format string, a ...any) *Logger

func W added in v1.2.0

func W(message ...any) *Logger

func Warn

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

func Warnf added in v1.1.0

func Warnf(summary string, data any, format string, a ...any) *Logger

func Wf added in v1.2.0

func Wf(format 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