logging

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2020 License: Apache-2.0, MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encoder

func Encoder() zapcore.Encoder

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 NewLogger

func NewLogger(extraWs ...zapcore.WriteSyncer) *zap.Logger

NewLogger returns a logger that outputs to stdout AND any extra WriteSyncers that have been passed in.

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.

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