log

package module
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2021 License: MIT Imports: 7 Imported by: 0

README

log

Logging wrapper library based on zerolog.

Installing

go get github.com/alexferl/x/log

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultConfig = &Config{
		LogLevel:  "info",
		LogOutput: "stdout",
		LogWriter: "console",
	}
)

Functions

func New

func New(config *Config) error

New initializes the logger based on the passed Config, defaults to DefaultConfig if `config` is nil

Types

type Config

type Config struct {
	LogLevel  string
	LogOutput string
	LogWriter string
}

Config holds all log configuration

func (*Config) BindFlags

func (c *Config) BindFlags(fs *pflag.FlagSet)

BindFlags adds all the flags from the command line

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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