logging

package
v0.0.0-...-d3ccc4f Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRootLogger

func NewRootLogger() zerolog.Logger

NewRootLogger creates a new zerolog logger with default settings.

Types

type Service

type Service interface {
	// MustGetLogger creates a logger with given name.
	MustGetLogger(name string) zerolog.Logger
	// MustSetLevel sets the log level for the component with given name to given level.
	MustSetLevel(name, level string)
	// ConfigureRootLogger calls the given callback to modify the root logger.
	ConfigureRootLogger(cb func(rootLog zerolog.Logger) zerolog.Logger)
	// CaptureGLog configures glog to write to the given logger
	CaptureGLog(log zerolog.Logger)
}

Service exposes the interfaces for a logger service that supports different loggers with different levels.

func NewService

func NewService(defaultLevel string) (Service, error)

NewService creates a new Service.

Jump to

Keyboard shortcuts

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