logger

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// INFO : Informational messages printed with green.
	INFO = "INFO"
	// DEBUG : Debugging messages printed with teal.
	DEBUG = "DEBUG"
	// WARN : Warning messages printed with yellow.
	WARN = "WARN"
	// ERROR : Error messages printed with red.
	ERROR = "ERROR"
	// CRITICAL : Critical messages printed with magenta.
	CRITICAL = "CRITICAL"
	// NONE : Print normal messages with none of color and date, prefix.
	NONE = "NONE"
)

Variables

This section is empty.

Functions

func GetLogger

func GetLogger() *log.Logger

GetLogger : Return the custom logger

func Printf

func Printf(logLevel string, printCallLocation bool, format string, a ...any)

Printf : Print the formatted log with a colored level

func Println

func Println(logLevel string, printCallLocation bool, msg ...interface{})

Println : Print the log with a colored level with new line

func SetLogger

func SetLogger(logger *log.Logger)

SetLogger : Set the custom logger

Types

This section is empty.

Jump to

Keyboard shortcuts

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