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:
@@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user