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

Update to 8.0.4 | New: transfer a message to the request logger

Former-commit-id: 2bab3c9f28f7e9edd5d85e579349f70388af871d
This commit is contained in:
kataras
2017-07-17 17:42:51 +03:00
parent 56aa3de645
commit 093d087a68
13 changed files with 394 additions and 157 deletions

View File

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