logger

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

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

Go to latest
Published: Aug 4, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(err error, code int)

Error logs an error message to the console with the file and line number. If exitOnError flag is set, the program will exit after logging the error.

func Info

func Info(message string)

Info logs an information message to the console with the file and line number.

func InitLogger

func InitLogger(infoOutput, warningOutput, errorOutput, fileOutput io.Writer) error

Initializes the loggers with their respective outputs and formats.

func SetExitOnError

func SetExitOnError(exit bool)

SetExitOnError sets the behavior of program termination on error logs. If exit is true, the program will exit on error logs. If exit is false, the program will not exit on error logs.

func Warning

func Warning(message string)

Warning logs a warning message to the console with the file and line number.

Types

This section is empty.

Jump to

Keyboard shortcuts

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