Documentation

Overview

    Package goalogrus contains an adapter that makes it possible to configure goa so it uses logrus as logger backend. Usage:

    logger := logrus.New()
    // Initialize logger handler using logrus package
    service.WithLogger(goalogrus.New(logger))
    // ... Proceed with configuring and starting the goa service
    
    // In handlers:
    goalogrus.Entry(ctx).Info("foo", "bar")
    

    Index

    Constants

    This section is empty.

    Variables

    This section is empty.

    Functions

    func Entry

    func Entry(ctx context.Context) *logrus.Entry

      Entry returns the logrus log entry stored in the given context if any, nil otherwise.

      func FromEntry

      func FromEntry(entry *logrus.Entry) goa.LogAdapter

        FromEntry wraps a logrus log entry into a goa logger.

        func New

        func New(logger *logrus.Logger) goa.LogAdapter

          New wraps a logrus logger into a goa logger.

          Types

          This section is empty.

          Source Files