logging

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2020 License: Apache-2.0, MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DevelopmentMode

func DevelopmentMode()

DevelopmentMode switches logging output to development mode.

func IsTerminal

func IsTerminal() bool

IsTerminal returns whether we're running in terminal mode.

func L

func L() *zap.Logger

L returns the global raw logger.

func S

func S() *zap.SugaredLogger

S returns the global sugared logger.

func SetLevel

func SetLevel(l zapcore.Level)

SetLevel adjusts the level of the loggers.

func TerminalMode

func TerminalMode()

TerminalMode switches logging output to TTY mode.

Types

type Logging

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

Logging is a simple mixin for types with attached loggers.

func NewLogging

func NewLogging(logger *zap.Logger) Logging

NewLogging is a convenience method for constructing a Logging.

func (*Logging) L

func (l *Logging) L() *zap.Logger

L returns the raw logger.

func (*Logging) S

func (l *Logging) S() *zap.SugaredLogger

S returns the sugared logger.

Jump to

Keyboard shortcuts

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