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

accesslog middleware: add total bytes received and sent

relative to: https://github.com/kataras/iris/issues/1601
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-09-08 13:44:50 +03:00
parent a4996b90c8
commit d6867e1f9e
7 changed files with 223 additions and 53 deletions

View File

@@ -30,7 +30,7 @@ func TestAccessLogPrint_Simple(t *testing.T) {
for i := 0; i < goroutinesN; i++ {
wg.Add(1)
expected += "0001-01-01 00:00:00|1s|GET|/path_value?url_query=url_query_value|path_param=path_param_value url_query=url_query_value custom=custom_value|200|Incoming|Outcoming|\n"
expected += "0001-01-01 00:00:00|1s|GET|/path_value?url_query=url_query_value|path_param=path_param_value url_query=url_query_value custom=custom_value|200|||Incoming|Outcoming|\n"
go func() {
defer wg.Done()
@@ -44,6 +44,8 @@ func TestAccessLogPrint_Simple(t *testing.T) {
"/path_value?url_query=url_query_value",
"Incoming",
"Outcoming",
0,
0,
&context.RequestParams{
Store: []memstore.Entry{
{Key: "path_param", ValueRaw: "path_param_value"},