goa: github.com/goadesign/goa/logging/kit Index | Files

package goakit

import "github.com/goadesign/goa/logging/kit"

Package goakit contains an adapter that makes it possible to configure goa so it uses the go-kit log package as logger backend. Usage:

// Initialize logger using github.com/go-kit/kit/log package
logger := log.NewLogfmtLogger(w)
// Initialize goa service logger using adapter
// ... Proceed with configuring and starting the goa service

// In middlewares:
goakit.Logger(ctx).Log("foo", "bar")


Package Files


func Logger Uses

func Logger(ctx context.Context) log.Logger

Logger returns the go-kit logger stored in the given context if any, nil otherwise.

func New Uses

func New(logger log.Logger) goa.LogAdapter

New wraps a go-kit logger into a goa logger.

Package goakit imports 3 packages (graph) and is imported by 2 packages. Updated 2017-04-25. Refresh now. Tools for package owners.