Skip to content

timehop/golog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

golog

Severity-based key/value logging replacement for Go's standard logger.

Outputs a message, along with a set key/value pairs for easy parsing.

Example:

// import "github.com/timehop/golog/log"

log.Error("MyLibrary", "Could not connect to server.", "url", url, "error", err.Error())
log.Info("MyLibrary", "Something happened.")

Would output something like:

ERROR | MyLibrary | Could not connect to server. | url='http://timehop.com/' error='timed out'
INFO  | MyLibrary | Something happened.

Build

License

MIT