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