mirror of
https://github.com/kataras/iris.git
synced 2025-12-17 18:07:01 +00:00
thank you @dtrifonov for your donation ❤️
This commit is contained in:
@@ -5,9 +5,6 @@ import (
|
||||
"github.com/kataras/iris/v12/middleware/accesslog"
|
||||
)
|
||||
|
||||
// Default line format:
|
||||
// Time|Latency|Code|Method|Path|IP|Path Params Query Fields|Bytes Received|Bytes Sent|Request|Response|
|
||||
//
|
||||
// Read the example and its comments carefully.
|
||||
func makeAccessLog() *accesslog.AccessLog {
|
||||
// Initialize a new access log middleware.
|
||||
@@ -28,6 +25,9 @@ func makeAccessLog() *accesslog.AccessLog {
|
||||
ac.KeepMultiLineError = true
|
||||
ac.PanicLog = accesslog.LogHandler
|
||||
|
||||
// Default line format if formatter is missing:
|
||||
// Time|Latency|Code|Method|Path|IP|Path Params Query Fields|Bytes Received|Bytes Sent|Request|Response|
|
||||
//
|
||||
// Set Custom Formatter:
|
||||
ac.SetFormatter(&accesslog.JSON{
|
||||
Indent: " ",
|
||||
|
||||
Reference in New Issue
Block a user