1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 18:37:05 +00:00

accesslog: export the delimeter used on default formatter and improve its performance

relative to: #1601 and #1622
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-09-11 23:22:18 +03:00
parent 17b32e3aaa
commit a30bbb61f7
4 changed files with 87 additions and 16 deletions

View File

@@ -12,6 +12,10 @@ import (
rotatelogs "github.com/lestrrat-go/file-rotatelogs"
)
// 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 {
// Optionally, let's Go with log rotation.
pathToAccessLog := "./access_log.%Y%m%d%H%M"