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
service.WithLogger(goakit.New(logger))
// ... Proceed with configuring and starting the goa service

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

Index

Package Files

adapter.go

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 1 packages. Updated 2017-03-08. Refresh now. Tools for package owners.