@@ -79,14 +79,14 @@ class GrokParserTest < ::Test::Unit::TestCase
7979 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"' ,
8080 str2time ( "28/Feb/2013:12:00:00 +0900" , "%d/%b/%Y:%H:%M:%S %z" ) ,
8181 {
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" ,
9090 } ,
9191 "time_key" => "timestamp" ,
9292 "time_format" => "%d/%b/%Y:%H:%M:%S %z" ,
@@ -394,14 +394,14 @@ class GrokParserTest < ::Test::Unit::TestCase
394394 </grok>
395395 ] )
396396 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"
405405 }
406406 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 |
407407 assert_equal ( expected_record , record )
0 commit comments