logger

package module
v0.0.0-...-4496259 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 3 Imported by: 0

README

Fiber Structured Access Logging Middleware

This library is created to log Fiber access logs via the structured logging package so it could be easily filtered out based on the "component" field of the log entry.

In order to use it get the latest version by running:

go get github.com/iktech/fiber-slog-middleware

In order to initialise it use the following code snippet:

    app := fiber.New(fiber.Config{
        Prefork:               false,
        AppName:               "My awesome application",
    })

    app.Use(logger.New("access_logger"))

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(component string) fiber.Handler

New creates a new middleware handler

func NewWithExclusions

func NewWithExclusions(component string, exclusions []string) fiber.Handler

NewWithExclusions creates a new middleware handler with list of routes excluded from logging

Types

This section is empty.

Jump to

Keyboard shortcuts

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