An open API service indexing awesome lists of open source software.

https://github.com/clavoie/logu

Injectable wrappers around AppEngine logging for Go
https://github.com/clavoie/logu

appengine appengine-go go golang logging

Last synced: about 1 month ago
JSON representation

Injectable wrappers around AppEngine logging for Go

Awesome Lists containing this project

README

        

# logu [![GoDoc](https://godoc.org/github.com/clavoie/logu?status.svg)](http://godoc.org/github.com/clavoie/logu) [![Build Status](https://travis-ci.org/clavoie/logu.svg?branch=master)](https://travis-ci.org/clavoie/logu) [![Go Report Card](https://goreportcard.com/badge/github.com/clavoie/logu)](https://goreportcard.com/report/github.com/clavoie/logu)

Injectable wrappers around Google AppEngine logging for Go.

logu is an interface around the Google AppEngine [log package](https://cloud.google.com/appengine/docs/standard/go/logs/reference) that integrates well with dependency injection. An implementation of the logging interface is also provided for [testing](https://godoc.org/github.com/clavoie/logu#NewTestLogger), a [null logger](https://godoc.org/github.com/clavoie/logu#NewNullLogger) implementation which throws away all log messages, as well as an [implementation that writes to the go log package](https://godoc.org/github.com/clavoie/logu#NewGoLogger). [Mocks](https://godoc.org/github.com/clavoie/logu/mocks) generated by [mockgen](https://github.com/golang/mock) are also provided as part of this package.

A full example of using logu along with [erru](https://github.com/clavoie/erru) and [di](https://github.com/clavoie/di) is available [here](https://godoc.org/github.com/clavoie/logu#example-Logger).