logging

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func LoggerFromLoggingConfig

func LoggerFromLoggingConfig(loggingConfig *LoggingConfig,
	writer io.Writer) (log.Logger, error)

func NewTerminalLogger

func NewTerminalLogger(loggingType LoggingType, writer io.Writer) (log.Logger, error)

func OutputLoggerMaker

func OutputLoggerMaker(loggingType LoggingType) (func(writer io.Writer) log.Logger, error)

Types

type LoggingConfig

type LoggingConfig struct {
	// Channels to listen on, messages not on these channels will be filtered
	// leaving empty disables logging
	LoggingType LoggingType
	Channels    []structure.Channel
}

func NewLoggingConfig

func NewLoggingConfig(loggingType LoggingType,
	channels ...structure.Channel) *LoggingConfig

type LoggingType

type LoggingType string
const (
	Logfmt LoggingType = "logfmt"
	Json   LoggingType = "json"
)

Jump to

Keyboard shortcuts

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