zaplog

package
v0.0.0-...-a59a69c Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(msg string, fields ...Field)

Debug add log entry with debug level

func DebugMode

func DebugMode()

DebugMode sets the log level to debug

func Error

func Error(msg string, fields ...Field)

Error add log entry with error level

func Fatal

func Fatal(msg string, fields ...Field)

Fatal add log entry with fatal level

func Info

func Info(msg string, fields ...Field)

Info add log entry with info level

func Panic

func Panic(msg string, fields ...Field)

Panic add log entry with panic level

func Reset

func Reset()

Reset will reset the log to the original setup

func Warn

func Warn(msg string, fields ...Field)

Warn add log entry with warn level

Types

type Field

type Field = zapcore.Field

Field is the type for koollog field

func Any

func Any(key string, value interface{}) Field

Any takes a key and an arbitrary value and chooses the best way to represent them as a field, falling back to a reflection-based approach only if necessary.

Since byte/uint8 and rune/int32 are aliases, Any can't differentiate between them. To minimize surprises, []byte values are treated as binary blobs, byte values are treated as uint8, and runes are always treated as integers.

Jump to

Keyboard shortcuts

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