logging

package
v0.0.0-...-271f870 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Logger zerolog.Logger

	// level prefix as defined in man 3 sd-daemon
	SD_EMERG   = fmt.Sprintf("<%d>", syslog.LOG_EMERG)
	SD_CRIT    = fmt.Sprintf("<%d>", syslog.LOG_CRIT)
	SD_ERR     = fmt.Sprintf("<%d>", syslog.LOG_ERR)
	SD_WARNING = fmt.Sprintf("<%d>", syslog.LOG_WARNING)
	SD_INFO    = fmt.Sprintf("<%d>", syslog.LOG_INFO)
	SD_DEBUG   = fmt.Sprintf("<%d>", syslog.LOG_DEBUG)
)

Functions

func Debug

func Debug() *zerolog.Event

func Error

func Error() *zerolog.Event

func Fatal

func Fatal() *zerolog.Event

func FromCtx

func FromCtx(ctx context.Context) *zerolog.Logger

func FromMacaron

func FromMacaron(ctx *macaron.Context) *zerolog.Logger

func Info

func Info() *zerolog.Event

func Setup

func Setup(cfg *Config, dev bool)

func Trace

func Trace() *zerolog.Event

func Warn

func Warn() *zerolog.Event

Types

type Config

type Config struct {
	UseSystemd bool
	Level      string
}

func (*Config) Validate

func (cfg *Config) Validate() error

Jump to

Keyboard shortcuts

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