Documentation
¶
Index ¶
- func AddEntryToCTX(ctx context.Context, entry *logrus.Entry) context.Context
- func AddFieldsToCTX(ctx context.Context, fields logrus.Fields) context.Context
- func Debug(ctx context.Context, v ...interface{})
- func Debugf(ctx context.Context, format string, args ...interface{})
- func Error(ctx context.Context, v ...interface{})
- func Errorf(ctx context.Context, format string, args ...interface{})
- func Fatal(ctx context.Context, v ...interface{})
- func Fatalf(ctx context.Context, format string, args ...interface{})
- func GetEntryFromCTX(ctx context.Context) (*logrus.Entry, bool)
- func GetFieldsFromCTX(ctx context.Context) logrus.Fields
- func Info(ctx context.Context, v ...interface{})
- func Infof(ctx context.Context, format string, args ...interface{})
- func InitLog(out io.Writer)
- func MustGetEntryFromCTX(ctx context.Context) *logrus.Entry
- func NewEntryFormCTXWithFields(ctx context.Context) *logrus.Entry
- func NewFromCTX(ctx context.Context) *logrus.Entry
- func Panic(ctx context.Context, v ...interface{})
- func Panicf(ctx context.Context, format string, args ...interface{})
- func ServerLoggerUnaryInterceptor() ...
- func Trace(ctx context.Context, v ...interface{})
- func Tracef(ctx context.Context, format string, args ...interface{})
- func Warn(ctx context.Context, v ...interface{})
- func Warnf(ctx context.Context, format string, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddEntryToCTX ¶
AddEntryToCTX adds entry to ctx
func AddFieldsToCTX ¶
AddFieldsToCTX adds fields to ctx
func InitLog ¶
InitLog initializes logrus logger It uses nested-logrus-formatter It sets log level from LOGLVL env variable data format: 2006|01|02 15:04:05.000
func MustGetEntryFromCTX ¶
MustGetEntryFromCTX returns a *logrus.Entry from ctx if ctx has no *logrus.Entry, returns a new *logrus.Entry
func NewEntryFormCTXWithFields ¶
NewEntryFormCTXWithFields returns a *logrus.Entry with fields from ctx
func NewFromCTX ¶
NewFromCTX returns a new logrus.Entry with fields from ctx
func ServerLoggerUnaryInterceptor ¶
func ServerLoggerUnaryInterceptor() func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.