Flexible structured logging for Go that is not fast by accident.
// simple fluent configuration API
tidy.Configure()
.LogFromLevel(tidy.DEBUG).To(tidy.Console)
.LogFromLevel(tidy.INFO).To(logentries.Token(token))
.BuildDefault()
// get a logger for the current context
log := tidy.GetLogger()
// log an entry with a single field at debug level
log.With("user", session.User).Debug("user authenticated")
// log entry with multiple fields at warning level
log.Withs(tidy.Fields{
"user": session.User,
"url": request.Url,
).Warn("unauthorized request")
08:45:10 W (my_module): user authenticated → username=catty
08:45:11 W (my_module): unauthorized request → username=catty url=/list/5
We have very precise rules over how our git commit messages can be formatted. This leads to more readable messages that are easy to follow when looking through the project history.
Each commit message consists of a header, a body and a footer. The header has a special format that includes a type, a scope and a subject:
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
Any line of the commit message cannot be longer 100 characters! This allows the message to be easier to read on github as well as in various git tools.
Must be one of the following:
The scope could be anything specifying place of the commit change. For example logger
,
text
, console
, appengine
, backend
, etc...
The subject contains succinct description of the change:
Just as in the subject, use the imperative, present tense: "change" not "changed" nor "changes" The body should include the motivation for the change and contrast this with previous behavior.
The footer might reference GitHub issues that this commit relates to or Closes.