Movatterモバイル変換


[0]ホーム

URL:


logger

packagemodule
v0.3.0Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License:MITImports:5Imported by:11

Details

Repository

github.com/chi-middleware/logrus-logger

Links

README

Chi logrus-logger middleware

logrus-logger is a request logging middleware for Chi usingLogrus logging library

DocumentationcodecovGo Report CardBuild Status

Usage

Import using:

import "github.com/chi-middleware/logrus-logger"

Use middleware with default (Info) logging level:

    log := logrus.New()    r := chi.NewRouter()    r.Use(logger.Logger("router", log))

or

Use middleware with Debug logging level:

    log := logrus.New()    log.SetLevel(logrus.TraceLevel)    r := chi.NewRouter()    r.Use(logger.LoggerWithLevel("router", log, logrus.DebugLevel))

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

funcLogger

func Logger(categorystring, loggerlogrus.FieldLogger) func(hhttp.Handler)http.Handler

funcLoggerWithLeveladded inv0.3.0

func LoggerWithLevel(categorystring, loggerlogrus.FieldLogger, levellogrus.Level) func(hhttp.Handler)http.Handler

Logger returns a request logging middleware

Types

This section is empty.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp