goakit

package
v1.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 4, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func Logger added in v1.2.0

func Logger(ctx context.Context) log.Logger

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

func New

func New(logger log.Logger) goa.LogAdapter

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

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL