logger

package
v0.0.0-...-cb8f91d Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToString

func ToString(o interface{}) string

Types

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"`
}

Jump to

Keyboard shortcuts

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