logger

package
v1.0.2-0...-2da3d3e Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GetLogger = NewLoggerFactoryFromEnv("PEERCALLS_", os.Stderr).GetLogger
View Source
var TimeFormat = "2006-01-02T15:04:05.000000Z07:00"

Functions

This section is empty.

Types

type Logger

type Logger struct {
	Enabled bool
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger(name string, out io.Writer, enabled bool) *Logger

func (*Logger) Printf

func (l *Logger) Printf(message string, values ...interface{})

func (*Logger) Println

func (l *Logger) Println(values ...interface{})

type LoggerFactory

type LoggerFactory struct {
	// contains filtered or unexported fields
}

func NewLoggerFactory

func NewLoggerFactory(out io.Writer, enabled map[string]struct{}) *LoggerFactory

func NewLoggerFactoryFromEnv

func NewLoggerFactoryFromEnv(prefix string, out io.Writer) *LoggerFactory

func (*LoggerFactory) GetLogger

func (l *LoggerFactory) GetLogger(name string) *Logger

Jump to

Keyboard shortcuts

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