...

Package commonlog

import "github.com/gin-gonic/contrib/commonlog"
Overview
Index

Overview ▾

func New

func New() gin.HandlerFunc

Instances a Logger middleware that will write the logs to gin.DefaultWriter By default gin.DefaultWriter = os.Stdout

func NewWithWriter

func NewWithWriter(out io.Writer) gin.HandlerFunc

Instance a Logger middleware with the specified writer buffer. Example: os.Stdout, a file opened in write mode, a socket...