Skip to content

Latest commit

 

History

History

log

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Log

Middleware for logging request and response data.

Usage

Import

import "github.com/ngamux/middleware/log"

Instance With Default Config

logMiddleware := log.New()

Instance With Custom Config

logMiddleware := log.New(log.Config{
  Format: "${method} ${path} ${status}",
})

Mount to Ngamux

mux := ngamux.New()
mux.Use(logMiddleware)