log

package
v0.0.0-...-bc5839e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFields

func AddFields(ctx context.Context, fields map[string]interface{}) context.Context

AddFields merges new fields with context logger's fields, and update new logger into context if ctx is nil, it is same with WithFields().

func Init

func Init(debug bool)

Init initializes log Level and log format.

func NewContext

func NewContext(ctx context.Context, fields map[string]interface{}) context.Context

NewContext returns new log entry, if context has old entry, it will be overwrite

func With

func With(ctx context.Context) *logrus.Entry

With returns log entry from context

func WithFields

func WithFields(ctx context.Context, fields map[string]interface{}) *logrus.Entry

WithFields merges new fields with context logger's fields, but don't update into context

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL