Skip to content
/ log Public

log library with multiple output and level

Notifications You must be signed in to change notification settings

moorada/log

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

log

log library with multiple output and level

go get github.com/moorada/log

Example

config := log.FormatConfigBasic
config.Format = "{level:name} {message}"
_ = log.AddOutput("logs_test1.log", log.DEBUG, config, true)

config2 := log.FormatConfigBasic
config2.Format = "{time} {level:color}{level:name}{reset} {message}"
_ = log.AddOutput("", log.ERROR, config2, true) // Stdout

log.Debug("Hello world! %s", "Hello")
log.Error("Hello world! %s", "ciao1")

_ = log.RemoveOutput("logs_test1.log")

This library is an extension of isLazy/log by evilsocket.

About

log library with multiple output and level

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages