log

package
v0.0.0-...-a671794 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package log configures a new logger for an application.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewErrorStandardLogger

func NewErrorStandardLogger(logger logur.Logger) *log.Logger

NewErrorStandardLogger returns a new standard logger logging on error level.

func NewLogger

func NewLogger(config Config) logur.LoggerFacade

NewLogger creates a new logger.

func SetStandardLogger

func SetStandardLogger(logger logur.Logger)

SetStandardLogger sets the global logger's output to a custom logger instance.

Types

type Config

type Config struct {
	// Format specifies the output log format.
	// Accepted values are: json, logfmt
	Format string

	// Level is the minimum log level that should appear on the output.
	Level string

	// NoColor makes sure that no log output gets colorized.
	NoColor bool
}

Config holds details necessary for logging.

Jump to

Keyboard shortcuts

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