Back to godoc.org

Package logger

v0.0.0-...-cb8f91d
Latest Go to latest

The latest major version is .

Published: Jun 13, 2020 | License: MIT | Module: github.com/dmitrymatviets/myhood

Index

func ToString

func ToString(o interface{}) string

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func New

func New(cfg LoggerConfig) (*Logger, error)

func (*Logger) Debug

func (log *Logger) Debug(ctx context.Context, msg string, keysAndValues ...interface{})

func (*Logger) Error

func (log *Logger) Error(ctx context.Context, msg string, keysAndValues ...interface{})

func (*Logger) Fatal

func (log *Logger) Fatal(ctx context.Context, msg string, keysAndValues ...interface{})

func (*Logger) Info

func (log *Logger) Info(ctx context.Context, msg string, keysAndValues ...interface{})

func (*Logger) Warn

func (log *Logger) Warn(ctx context.Context, msg string, keysAndValues ...interface{})

type LoggerConfig

type LoggerConfig struct {
	Debug       bool     `envconfig:"debug"`
	Level       string   `envconfig:"level"`
	Output      []string `envconfig:"output"`
	TimeEncoder string   `envconfig:"time_encoder"`
	AppName     string   `envconfig:"app_name"`
}

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier