logger

package
v0.0.0-...-af9c1cf Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JSONFormat = "json"
	TextFormat = "text"
)

The log format can either be text or JSON.

Variables

This section is empty.

Functions

func New

func New(config Config) (*zap.SugaredLogger, error)

Types

type Config

type Config struct {
	Level  string `json:"level" default:"info" env:"LOG_LEVEL"`
	Format string `json:"format" default:"json" env:"LOG_FORMAT"`
}

Config stores the config for the logger.

Jump to

Keyboard shortcuts

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