log

package
v0.0.0-...-c83d288 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2018 License: MIT Imports: 6 Imported by: 25

Documentation

Overview

Package log provides a normalized interface for logging.

Index

Constants

View Source
const (
	OutputStdout outputType = iota
	OutputStderr
	OutputNull
)

Variables

This section is empty.

Functions

func StdLogger

func StdLogger(l Logger, level string) (*stdlog.Logger, io.Closer, error)

Types

type Config

type Config struct {
	Level      string     `toml:"level"`
	OutputType outputType `toml:"output_type"`
}

Config contains information on how to configure a logger.

type Logger

type Logger logrus.FieldLogger

Logger is the standard interface services should make use of.

func New

func New(c Config) Logger

New creates and configures a new Logger using the given Config.

Jump to

Keyboard shortcuts

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