log

package
v0.0.0-...-d4cdb63 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Trace provides the trace logger, usually disabled except under verbose debug
	Trace *log.Logger

	// Debug provides the debug logger, usually disabled unless --debug is set.
	Debug *log.Logger

	// Info provides the info logger, usually disabled unless --verbose is set
	Info *log.Logger

	// Warn provides the warning logger.
	Warn *log.Logger

	// Error provides the error logger
	Error *log.Logger

	// Fatal provides the panic logger.
	Fatal *log.Logger
)

Functions

func InitLogger

func InitLogger()

InitLogger checks debug and verbosity settings, then initializes all loggers.

func Report

func Report(msg string, start time.Time)

Report takes a logging message and an executed Time() function, it then calls the Info.Prinln function and calculates the time since Time() executed. This is useful in cases where you want to determine how long it took Avocet to perform an operation.

func Sync

func Sync()

func Time

func Time() time.Time

Time function used to retrieve the current time. This is used in logs when calculating the amount of time an operation takes to run. It is usually combined with the Report function.

Types

This section is empty.

Jump to

Keyboard shortcuts

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