From addf984ed33c1ddb079d5f54a744d17131fb9889 Mon Sep 17 00:00:00 2001 From: Chengyumeng <792400644@qq.com> Date: Wed, 28 Mar 2018 20:39:56 +0800 Subject: [PATCH] fix the bug of lost argument in log function Former-commit-id: 566a0c8bff8e77d5d12c1b4d10b3c69be0a962ba --- .../http_request/request-logger/request-logger-file/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_examples/http_request/request-logger/request-logger-file/main.go b/_examples/http_request/request-logger/request-logger-file/main.go index ed5d7043..86e68cba 100644 --- a/_examples/http_request/request-logger/request-logger-file/main.go +++ b/_examples/http_request/request-logger/request-logger-file/main.go @@ -85,8 +85,8 @@ 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{}) { - output := logger.Columnize(now.Format("2006/01/02 - 15:04:05"), latency, status, ip, method, path, message) + 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)) }