mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
18 lines
311 B
Go
18 lines
311 B
Go
package middlewares
|
|
|
|
import (
|
|
"github.com/gorilla/handlers"
|
|
"net/http"
|
|
"os"
|
|
)
|
|
|
|
type LoggingMiddleware struct{}
|
|
|
|
func NewLoggingMiddleware() *LoggingMiddleware {
|
|
return &LoggingMiddleware{}
|
|
}
|
|
|
|
func (m *LoggingMiddleware) Handler(h http.Handler) http.Handler {
|
|
return handlers.LoggingHandler(os.Stdout, h)
|
|
}
|