Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Logger ¶
type Logger interface { Trace(msg string, args ...interface{}) Tracew(msg string, md Metadata, args ...interface{}) Debug(msg string, args ...interface{}) Debugw(msg string, md Metadata, args ...interface{}) Info(msg string, args ...interface{}) Infow(msg string, md Metadata, args ...interface{}) Warn(msg string, args ...interface{}) Warnw(msg string, md Metadata, args ...interface{}) Error(msg string, args ...interface{}) Errorw(msg string, md Metadata, args ...interface{}) Fatal(msg string, args ...interface{}) Fatalw(msg string, md Metadata, args ...interface{}) Panic(msg string, args ...interface{}) Panicw(msg string, md Metadata, args ...interface{}) Log(level LogLevel, msg string, args ...interface{}) Logw(level LogLevel, msg string, md Metadata, args ...interface{}) }
Logger defines generic interface for all logger.
type Metadata ¶
type Metadata map[string]interface{}
Metadata defines metadata for logger, which will be included whenever log is written.
func MergeMetadata ¶
MergeMetadata creates new metadata as a result from merging between md1 and md2.
func MetadataFromContext ¶
MetadataFromContext extract log.Metadata from context
type MetadataContextKeyType ¶
type MetadataContextKeyType string
MetadataContextKeyType defines custom type for context metadata
const ( // MetadataContextKey is a custom context key for metadata MetadataContextKey MetadataContextKeyType = "metadata.context.key" )
Click to show internal directories.
Click to hide internal directories.