Severity-based key/value logging replacement for Go's standard logger.
Go
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.circleci
log
vendor
.gitignore
Gopkg.lock
Gopkg.toml
LICENSE
README.md

README.md

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