1
0
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:
Gerasimos (Makis) Maropoulos
2020-11-06 14:19:53 +02:00
parent 3d5ed9926e
commit 7f523d52e1
8 changed files with 16 additions and 209 deletions

View File

@@ -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: " ",