logging

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2019 License: LGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoggerFactory

type LoggerFactory interface {
	NewNamedLogger(name string) zerolog.Logger
}

LoggerFactory is a factory that can be used to create named loggers using the same aligned configuration and namespace.

func New added in v0.0.10

func New(structuredLogging, unixTimeStamp, disableColoredLogs bool) LoggerFactory

New creates a new LoggerFactory which then can be used to create configured named loggers (log channels)

Example
// create the factory
loggingFactory := New(true, false, false)

// create new named logger
logger := loggingFactory.NewNamedLogger("MyLogger")
logger.Info().Msg("Hello World")
Output:

Jump to

Keyboard shortcuts

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