Documentation ¶
Overview ¶
Package loggermeta stores and accesses the container struct in context.Context.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewContext ¶
func NewContext(ctx context.Context, v *LoggerMeta) context.Context
NewContext returns a new context.Context that carries value v.
Types ¶
type LoggerMeta ¶
type LoggerMeta struct { // KeyVals is a mapping of key-value pairs a micro logger adds to the log // message issuance. KeyVals map[string]string }
LoggerMeta is a communication structure used to transport information in order for a micro logger to use it when issuing logs.
func FromContext ¶
func FromContext(ctx context.Context) (*LoggerMeta, bool)
FromContext returns the logger struct, if any.
func New ¶
func New() *LoggerMeta
Click to show internal directories.
Click to hide internal directories.