logger

package
v0.0.0-...-c4b140d Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(msg string, err error, fields ...Fields)

func Info

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

func Warn

func Warn(msg string, err error, fields ...Fields)

Types

type Fields

type Fields map[string]interface{}

Fields is a wrapper above map to be used for structured logging

type Logger

type Logger interface {
	Error(string, error, ...Fields)
	Warn(string, error, ...Fields)
	Info(string, ...Fields)
}

Logger defines contract for implementing logs

func NewLogger

func NewLogger(env string) Logger

NewLogger creates zap logger with default prod configs This function can be used to change logger configs

Jump to

Keyboard shortcuts

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