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

middleware/logger: new configuration field, defaults to false: Query bool, if true prints the full path, including the URL query as requested at https://github.com/kataras/iris/issues/1017

Former-commit-id: 03c8fc523a8ba955dae43e4c7e9498fc3d86a1c8
This commit is contained in:
Gerasimos Maropoulos
2018-05-31 01:39:23 +03:00
parent 5de17a08f9
commit f84248cb4e
4 changed files with 15 additions and 2 deletions

View File

@@ -85,7 +85,7 @@ func newRequestLogger() (h iris.Handler, close func() error) {
return err
}
c.LogFunc = func(now time.Time, latency time.Duration, status, ip, method, path string, message interface{},headerMessage interface{}) {
c.LogFunc = func(now time.Time, latency time.Duration, status, ip, method, path string, message interface{}, headerMessage interface{}) {
output := logger.Columnize(now.Format("2006/01/02 - 15:04:05"), latency, status, ip, method, path, message, headerMessage)
logFile.Write([]byte(output))
}