@@ -79,14 +79,14 @@ class GrokParserTest < ::Test::Unit::TestCase
79
79
internal_test_grok_pattern ( "%{HTTPD_COMBINEDLOG}" , '127.0.0.1 192.168.0.1 - [28/Feb/2013:12:00:00 +0900] "GET / HTTP/1.1" 200 777 "-" "Opera/12.0"' ,
80
80
str2time ( "28/Feb/2013:12:00:00 +0900" , "%d/%b/%Y:%H:%M:%S %z" ) ,
81
81
{
82
- "[ apache][ access][ user][ identity] " => "192.168.0.1" ,
83
- "[ http][ request][ method]" => "GET" ,
84
- "[ http][ response][ body][ bytes] " => 777 ,
85
- "[ http][ response][ status_code]" => 200 ,
86
- "[ http][ version]" => "1.1" ,
87
- "[ source][ address]" => "127.0.0.1" ,
88
- "[ url][ original]" => "/" ,
89
- "[ user_agent][ original]" => "Opera/12.0" ,
82
+ "apache. access. user. identity" => "192.168.0.1" ,
83
+ "http. request. method" => "GET" ,
84
+ "http. response. body. bytes" => 777 ,
85
+ "http. response. status_code" => 200 ,
86
+ "http. version" => "1.1" ,
87
+ "source. address" => "127.0.0.1" ,
88
+ "url. original" => "/" ,
89
+ "user_agent. original" => "Opera/12.0" ,
90
90
} ,
91
91
"time_key" => "timestamp" ,
92
92
"time_format" => "%d/%b/%Y:%H:%M:%S %z" ,
@@ -394,14 +394,14 @@ class GrokParserTest < ::Test::Unit::TestCase
394
394
</grok>
395
395
] )
396
396
expected_record = {
397
- "[ apache][ access][ user][ identity] " => "192.168.0.1" ,
398
- "[ http][ request][ method]" => "GET" ,
399
- "[ http][ response][ body][ bytes] " => 777 ,
400
- "[ http][ response][ status_code]" => 200 ,
401
- "[ http][ version]" => "1.1" ,
402
- "[ source][ address]" => "127.0.0.1" ,
403
- "[ url][ original]" => "/" ,
404
- "[ user_agent][ original]" => "Opera/12.0"
397
+ "apache. access. user. identity" => "192.168.0.1" ,
398
+ "http. request. method" => "GET" ,
399
+ "http. response. body. bytes" => 777 ,
400
+ "http. response. status_code" => 200 ,
401
+ "http. version" => "1.1" ,
402
+ "source. address" => "127.0.0.1" ,
403
+ "url. original" => "/" ,
404
+ "user_agent. original" => "Opera/12.0"
405
405
}
406
406
d . instance . parse ( '127.0.0.1 192.168.0.1 - [28/Feb/2013:12:00:00 +0900] "GET / HTTP/1.1" 200 777 "-" "Opera/12.0"' ) do |time , record |
407
407
assert_equal ( expected_record , record )
0 commit comments