Skip to content

steppanovva/extended-logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Logger extended with a log-level (info, warning, error) parameter.

Example:

func main() {
	logger := NewLogExtended()
	logger.SetLogLevel(Warning)
	logger.PrintInfo("Should not be printed") // because "info" level is
	// lower in priority than "warning" level of this logger
	logger.PrintWarning("Warning")
	logger.PrintError("Error")
	logger.Println("DEBUG")
}

Result:

2022/07/13 20:24:02 WARNING: Warning
2022/07/13 20:24:02 ERROR: Error
2022/07/13 20:24:02 DEBUG

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages