log

package
v0.0.0-...-6cd7eb2 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2020 License: MIT Imports: 5 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//ErrLoggerNotInitialized is thrown when uninitialized logger instance is requested
	ErrLoggerNotInitialized = errors.New("LoggerNotInitialized")
)

Functions

func CleanUp

func CleanUp()

CleanUp after the logger is closed

func DebugWithElapsedTime

func DebugWithElapsedTime(entry *log.Entry, start time.Time, args ...interface{})

DebugWithElapsedTime writes a new debug line, including a field with elapsed time call with defer at the start of a function: defer DebugWithElapsedTime(logger, time.Now(), "test")

func DebugfWithElapsedTime

func DebugfWithElapsedTime(entry *log.Entry, start time.Time, format string, args ...interface{})

DebugfWithElapsedTime writes a new debug format line, including a field with elapsed time call with defer at the start of a function: defer DebugWithElapsedTime(logger, time.Now(), "test %v", "test")

func GetLoggerInstance

func GetLoggerInstance() (*log.Logger, error)

GetLoggerInstance returns singleton instance of the logger

func InitializeLogger

func InitializeLogger(file *os.File, logFileName string, format log.Formatter, verboseFlag bool) (*log.Logger, error)

InitializeLogger with various properties

Types

This section is empty.

Jump to

Keyboard shortcuts

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