log

package
v0.0.0-...-f2344d4 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureLogger

func ConfigureLogger(cfg *conf.LogConfig) error

ConfigureLogger creates a new implementation of the Logger interface based on the configuration

func ConfigureMockLogger

func ConfigureMockLogger()

Types

type StandardLogger

type StandardLogger interface {
	Error(args ...interface{})
	Errorf(format string, args ...interface{})
	Fatalf(format string, args ...interface{})
	Fatal(args ...interface{})
	Infof(format string, args ...interface{})
	Info(args ...interface{})
	Warn(args ...interface{})
	Warnf(format string, args ...interface{})
	Debugf(format string, args ...interface{})
	Debug(args ...interface{})
}

StandardLogger represents a common interface for logging. It has the the most important functions for writing logs. Most logger are implementations of this interface, so you can just swap them without much change.

var Logger StandardLogger

Logger is the logger initialized when the application starts.

Jump to

Keyboard shortcuts

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