Documentation ¶
Index ¶
- func AddFields(ctx context.Context, fields map[string]interface{})
- func Debug(ctx context.Context, msg string, fields map[string]interface{})
- func Error(ctx context.Context, msg string, fields map[string]interface{})
- func Extract(ctx context.Context) *logger.Helper
- func Info(ctx context.Context, msg string, fields map[string]interface{})
- func TagsToFields(ctx context.Context) map[string]interface{}
- func ToContext(ctx context.Context, logger *logger.Helper) context.Context
- func Warn(ctx context.Context, msg string, fields map[string]interface{})
- type Fields
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debug ¶
Debug is equivalent to calling Debug on the logger.Logger in the context. It is a no-op if the context does not contain a logger.Logger.
func Error ¶
Error is equivalent to calling Error on the logger.Logger in the context. It is a no-op if the context does not contain a logger.Logger.
func Extract ¶
Extract takes the call-scoped Logger from grpc_logger middleware.
It always returns a Logger that has all the grpc_ctxtags updated.
func Info ¶
Info is equivalent to calling Info on the logger.Logger in the context. It is a no-op if the context does not contain a logger.Logger.
func TagsToFields ¶
TagsToFields transforms the Tags on the supplied context into logger fields.
Types ¶
Click to show internal directories.
Click to hide internal directories.