log

package
v0.0.0-...-699dfa3 Latest Latest
Warning

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

Go to latest
Published: May 31, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(outputPaths []string, encode LogEncoding) (err error)

manual init

Types

type LogEncoding

type LogEncoding string
const Console LogEncoding = "console"
const Json LogEncoding = "json"

type Logger

type Logger interface {
	Info(msg string, fields ...zapcore.Field)
	Error(msg string, fields ...zapcore.Field)
	Warn(msg string, fields ...zapcore.Field)
	Fatal(msg string, fields ...zapcore.Field)
	Debug(msg string, fields ...zapcore.Field)
	Panic(msg string, fields ...zapcore.Field)
}

func Bg

func Bg() Logger

get the normal Logger without write span log

func For

func For(ctx context.Context) Logger

if the context contains an span, return a spanLogger

Jump to

Keyboard shortcuts

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