log

package
v1.16.2 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Logger represents main logger implementation used in app.
	Logger = zap.NewNop()
)

Functions

func HandleFunc

func HandleFunc(buffLen int64) func(http.ResponseWriter, *http.Request)

HandleFunc returns handle function that writes logs to http.ResponseWriter with provided buffer size. Buffered length represented in kilobytes.

func InitLogging

func InitLogging(development bool, logDir, level string)

InitLogging initializes the main Logger consistent with passed log directory and level.

If an error occurs during execution, the program terminates with code 2 and the error will be written in os.Stderr.

InitLogging should be used only once while application is starting.

Types

This section is empty.

Jump to

Keyboard shortcuts

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