Skip to content

Releases: graze/golang-service

Recovery

24 Jan 14:42
Compare
Choose a tag to compare
  • Adds a new recovery handler (with a raygun integration, and definitions for adding custom handlers)

Refactor

07 Dec 10:50
Compare
Choose a tag to compare

Small bit of refactoring to so that:

  • The interface functions return the interface
  • All the functions of the standard logger (https://golang.org/pkg/log/) are implemented in log.<bla> and FieldLogger

Yup, Valid!

01 Dec 08:45
Compare
Choose a tag to compare

Adds some validation routines to handle Json and Xml User input validation.

  • Reads a *http.Request for xml/json content and populates a variable, then ensures that the variable is valid

Append

18 Nov 13:37
Compare
Choose a tag to compare
  • Adds AppendContext:
// new
ctx = log.AppendContext(ctx, log.KV{"key":"value"})
// old
ctx = log.Ctx(ctx).With(log.KV{"key":"value"}).NewContext(ctx)
  • Replaces uuid library with different one to hopefully reduce clashes

Tidy up

10 Nov 16:52
Compare
Choose a tag to compare
  • Ensure ContextLogger transaction key is always a string

De-dupe

10 Nov 14:36
Compare
Choose a tag to compare

Changing all the confusing naming that has appeared

Less is More

10 Nov 11:58
Compare
Choose a tag to compare

Remove modifying the state of an existing logger (use context.Context instead).

  • Removes .Add and .Merge from a log.Context

contextual

09 Nov 11:07
Compare
Choose a tag to compare

Giphy

  • Uses golang's: context.Context instead of hacking things together.

Breaking changes:

  • Renames log.F to log.KV
  • Renames log.Get to log.Fields
  • Renames log.GetLevel to log.Level
  • Changes how to get a log context from within a http.Handler

lintted

31 Oct 13:14
Compare
Choose a tag to compare

v0.3.0 as some interface and struct names have changed

all code now passes golint

Structured Logs

28 Oct 16:56
Compare
Choose a tag to compare
  • Adds structured logs using logfmt and json
  • Refactors some of the codebase