logrus

package
v0.0.0-...-d7c385a Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2024 License: MIT Imports: 6 Imported by: 0

README

Logrus Plugin

The Logrus plugin is a Goa plugin that adapt the basic logger to use the logrus library.

Enabling the Plugin

To enable the plugin import it in your design.go file using the blank identifier _ as follows:


package design

import . "goa.design/goa/v3/http/design"
import . "goa.design/goa/v3/http/dsl"
import _ "github.com/backyio/backy-goa-gen/logrus" // Enables the plugin

var _ = API("...

and generate as usual:

goa gen PACKAGE
goa example PACKAGE

where PACKAGE is the Go import path of the design package.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(genpkg string, roots []eval.Root, files []*codegen.File) ([]*codegen.File, error)

Generate generates logrus logger specific files.

func GenerateFiles

func GenerateFiles(genpkg string, root *expr.RootExpr) []*codegen.File

GenerateFiles create log specific files

func GenerateLoggerFile

func GenerateLoggerFile(genpkg string) *codegen.File

GenerateLoggerFile returns the generated logrus logger file.

func UpdateExample

func UpdateExample(genpkg string, roots []eval.Root, files []*codegen.File) ([]*codegen.File, error)

UpdateExample modifies the example generated files by replacing the log import reference when needed It also modify the initially generated main and service files

Types

This section is empty.

Jump to

Keyboard shortcuts

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