Documentation
¶
Index ¶
- Variables
- func GetCtxLogger(ctx context.Context) logrus.FieldLogger
- func NewStructuredLoggerEntry(logger logrus.FieldLogger, ctx context.Context) context.Context
- func SetCtxLogger(ctx context.Context, key string, value interface{}) (context.Context, logrus.FieldLogger)
- type CtxLoggerKeyType
- type StructuredLoggerEntry
Constants ¶
This section is empty.
Variables ¶
View Source
var ( API logrus.FieldLogger Auth logrus.FieldLogger BBAPI logrus.FieldLogger Request logrus.FieldLogger SSAS logrus.FieldLogger Worker logrus.FieldLogger BBWorker logrus.FieldLogger Health logrus.FieldLogger )
Functions ¶
func GetCtxLogger ¶
func GetCtxLogger(ctx context.Context) logrus.FieldLogger
Gets the logrus.FieldLogger from a context
func SetCtxLogger ¶
func SetCtxLogger(ctx context.Context, key string, value interface{}) (context.Context, logrus.FieldLogger)
Appends additional or creates new logrus.Fields to a logrus.FieldLogger within a context
Types ¶
type CtxLoggerKeyType ¶
type CtxLoggerKeyType string
type to create context.Context key
const CtxLoggerKey CtxLoggerKeyType = "ctxLogger"
context.Context key to set/get logrus.FieldLogger value within request context
type StructuredLoggerEntry ¶
type StructuredLoggerEntry struct {
Logger logrus.FieldLogger
}
func GetCtxEntry ¶
func GetCtxEntry(ctx context.Context) *StructuredLoggerEntry
Gets the logrus.StructuredLoggerEntry from a context
func (*StructuredLoggerEntry) Panic ¶
func (l *StructuredLoggerEntry) Panic(v interface{}, stack []byte)
Click to show internal directories.
Click to hide internal directories.