logger

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(format string, args ...interface{})

func Error

func Error(format string, args ...interface{})

func Fatal

func Fatal(args ...interface{})

func Info

func Info(format string, args ...interface{})

func Panic

func Panic(format string, args ...interface{})

func Warn

func Warn(format string, args ...interface{})

Types

type Fields

type Fields map[string]interface{}

Fields Type to pass when we want to call WithFields for structured logging

type Logger

type Logger interface {
	Debug(format string, args ...interface{})
	Info(format string, args ...interface{})
	Warn(format string, args ...interface{})
	Error(format string, args ...interface{})
	Fatal(args ...interface{})
	Panic(format string, args ...interface{})
	WithFields(keyValues Fields) Logger
}

Logger is our contract for the logger

var Log Logger

A global variable so that log functions can be directly accessed

func NewLogger

func NewLogger(out io.Writer) Logger

func WithFields

func WithFields(keyValues Fields) Logger

Jump to

Keyboard shortcuts

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