logging

package
v0.0.0-...-d64f9d6 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

type Field = zap.Field

type Log

type Log struct {
	Config zap.Config
	// contains filtered or unexported fields
}

func (Log) Debug

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

func (Log) Error

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

func (Log) Fatal

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

func (Log) Info

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

func (Log) Warn

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

func (Log) With

func (l Log) With(fields ...Field) Logger

type Logger

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

Logger is a unified interface for various logging use cases and practices.

func NewLogger

func NewLogger(opts ...zap.Option) (Logger, error)

type Options

type Options struct {
	Level  zapcore.Level // Level is the minimum log level that should be output
	Format string        // Format specifies the log output format.
}

Options holds logging configuration options

Jump to

Keyboard shortcuts

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