logging

package
v3.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2019 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 {
	LoggingType LoggingType
	Channels    []structure.Channel
}

LoggingConfig describes the channels to listen on, messages not on these channels will be filtered and leaving empty disables logging

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