Documentation ¶
Index ¶
- Variables
- func AddHook(hook Hook)
- func SetFormatter(formatter Formatter)
- func SetLevel(level Level)
- func SetOutput(output io.Writer)
- func SetReportCaller(reportCaller bool)
- type DefaultFieldsHook
- type Entry
- type Fields
- type Formatter
- type Hook
- type JSONFormatter
- type Level
- type Logger
- func Debug(summary string, data any, message string) *Logger
- func DebugF(summary string, data any, message string, a ...any) *Logger
- func Error(summary string, data any, message string) *Logger
- func ErrorF(summary string, data any, message string, a ...any) *Logger
- func Fatal(summary string, data any, message string) *Logger
- func FatalF(summary string, data any, message string, a ...any) *Logger
- func Info(summary string, data any, message string) *Logger
- func InfoF(summary string, data any, message string, a ...any) *Logger
- func Panic(summary string, data any, message string) *Logger
- func PanicF(summary string, data any, message string, a ...any) *Logger
- func Trace(summary string, data any, message string) *Logger
- func TraceF(summary string, data any, message string, a ...any) *Logger
- func Warn(summary string, data any, message string) *Logger
- func WarnF(summary string, data any, message string, a ...any) *Logger
- type TextFormatter
Constants ¶
This section is empty.
Variables ¶
View Source
var AllLevels = []Level{ PanicLevel, FatalLevel, ErrorLevel, WarnLevel, InfoLevel, DebugLevel, TraceLevel, }
Functions ¶
func SetFormatter ¶
func SetFormatter(formatter Formatter)
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 JSONFormatter ¶
type JSONFormatter = logrus.JSONFormatter
type 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 TextFormatter ¶
type TextFormatter = logrus.TextFormatter
Click to show internal directories.
Click to hide internal directories.