logger

package
v2.5.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Initialize

func Initialize(o *Options) *logrus.Logger

Initialize a new logger singleton. If one has already been instantiated, the singleton is returned

func Log

func Log() *logrus.Logger

Log returns the logger singleton. Panics if the singleton has not been initialized

func Reset

func Reset()

Reset the singleton so that Initialize must be called again

Types

type Options

type Options struct {
	Formatter *logrus.TextFormatter
	Level     logrus.Level
	Hooks     []logrus.Hook
}

Options describe the initialization options for the shared logger singleton

Jump to

Keyboard shortcuts

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