Documentation ¶
Index ¶
- Constants
- Variables
- func GetLogger(ctx context.Context) *logrus.Entry
- func ParseLevel(lvl string) (logrus.Level, error)
- func Trace(e *logrus.Entry, args ...interface{})
- func Tracef(e *logrus.Entry, format string, args ...interface{})
- func WithLogger(ctx context.Context, logger *logrus.Entry) context.Context
Constants ¶
View Source
const RFC3339NanoFixed = "2006-01-02T15:04:05.000000000Z07:00"
RFC3339NanoFixed is time.RFC3339Nano with nanoseconds padded using zeros to ensure the formatted time is always the same number of characters.
View Source
const TraceLevel = logrus.Level(uint32(logrus.DebugLevel + 1))
TraceLevel is the log level for tracing. Trace level is lower than debug level, and is usually used to trace detailed behavior of the program.
Variables ¶
View Source
var ( // G is an alias for GetLogger. // // We may want to define this locally to a package to get package tagged log // messages. G = GetLogger // L is an alias for the standard logger. L = logrus.NewEntry(logrus.StandardLogger()) )
Functions ¶
func GetLogger ¶
GetLogger retrieves the current logger from the context. If no logger is available, the default logger is returned.
func ParseLevel ¶ added in v1.2.3
ParseLevel takes a string level and returns the Logrus log level constant. It supports trace level.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.