logging

package
v0.0.0-...-5646104 Latest Latest
Warning

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

Go to latest
Published: May 21, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogging

func NewLogging(ca *LoggingConfig) *log.Logger

Types

type LogFormat

type LogFormat uint32
const (
	PlainFormat LogFormat = 0
	JsonFormat  LogFormat = 1
)

type LoggingConfig

type LoggingConfig struct {
	LogLevel  logrus.Level `json:"log_level,omitempty" env:"LOG_LEVEL" envDefault:"debug"`
	LogFormat LogFormat    `json:"log_format,omitempty" env:"LOG_FORMAT" envDefault:"plain"`
}

func NewLoggingConfigFromEnv

func NewLoggingConfigFromEnv() (*LoggingConfig, error)

Jump to

Keyboard shortcuts

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