logger

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLogger

func GetLogger(name string) *zap.SugaredLogger

GetLogger returns a custom named logger

func GetLoggerWithOptions

func GetLoggerWithOptions(name string, options *Opts) *zap.SugaredLogger

GetLoggerWithOptions returns a custom named logger with given options

Types

type Logger

type Logger struct {
	Logger        logr.Logger
	SugaredLogger *zap.SugaredLogger
}

Logger shared logger struct

type Opts

type Opts struct {
	// Verbose will increase logging
	Verbose bool
	// Output specifies where to log
	Output io.Writer
	// Output format
	OutputFormat string
	// Console logging doesn't display level nor timestamp and should be readable by humans
	Console bool
}

Opts describe logger options

Jump to

Keyboard shortcuts

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