Documentation ¶
Index ¶
- func Debug(msg string, ctx ...Ctx)
- func Debugf(format string, args ...any)
- func Error(msg string, ctx ...Ctx)
- func Errorf(format string, args ...any)
- func GetStack() string
- func Info(msg string, ctx ...Ctx)
- func Infof(format string, args ...any)
- func InitLogger(filepath string, syslogName string, verbose bool, debug bool, hook logrus.Hook) error
- func Panic(msg string, ctx ...Ctx)
- func Panicf(format string, args ...any)
- func Pretty(input any) string
- func Trace(msg string, ctx ...Ctx)
- func Tracef(format string, args ...any)
- func Warn(msg string, ctx ...Ctx)
- func Warnf(format string, args ...any)
- type Ctx
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetStack ¶
func GetStack() string
GetStack will convert the Go stack into a string suitable for logging.
func InitLogger ¶
func InitLogger(filepath string, syslogName string, verbose bool, debug bool, hook logrus.Hook) error
InitLogger intializes a full logging instance.
Types ¶
type Logger ¶
type Logger interface { Panic(msg string, args ...Ctx) Fatal(msg string, args ...Ctx) Error(msg string, args ...Ctx) Warn(msg string, args ...Ctx) Info(msg string, args ...Ctx) Debug(msg string, args ...Ctx) Trace(msg string, args ...Ctx) AddContext(Ctx) Logger }
Logger is the main logging interface.
var Log Logger
Log contains the logger used by all the logging functions.
func AddContext ¶
AddContext returns a new logger with the context added.
Click to show internal directories.
Click to hide internal directories.