Update the grammar for the WSGI eventlet logs
This patch modifies the grammar to match extra space that has been added by commit https://review.openstack.org/#/c/204003/ in oslo.service. Change-Id: I6040fe741ac5b4eb3e2a37503cad7fb612e90f8d Closes-Bug: #1556806
This commit is contained in:
parent
e8f94e8dca
commit
a30c910e51
@ -128,8 +128,8 @@ local openstack_response_time = l.P"time: "^-1 * l.Cg(l.digit^1 * dot^0 * l.digi
|
|||||||
-- Capture for OpenStack HTTP producing six values: http_method, http_url,
|
-- Capture for OpenStack HTTP producing six values: http_method, http_url,
|
||||||
-- http_version, http_status, http_response_size and http_response_time.
|
-- http_version, http_status, http_response_size and http_response_time.
|
||||||
openstack_http = anywhere(l.Ct(
|
openstack_http = anywhere(l.Ct(
|
||||||
quote * http_request * quote * sp *
|
quote * http_request * quote * sp^1 *
|
||||||
openstack_http_status * sp * openstack_response_size * sp *
|
openstack_http_status * sp^1 * openstack_response_size * sp^1 *
|
||||||
openstack_response_time
|
openstack_response_time
|
||||||
))
|
))
|
||||||
|
|
||||||
|
@ -95,6 +95,19 @@ TestPatterns = {}
|
|||||||
http_response_time = 0.0006731})
|
http_response_time = 0.0006731})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function TestPatterns:test_openstack_http_with_extra_space()
|
||||||
|
assertEquals(patt.openstack_http:match(
|
||||||
|
'"OPTIONS / HTTP/1.0" status: 200 len: 497 time: 0.0006731'),
|
||||||
|
{http_method = 'OPTIONS', http_url = '/', http_version = '1.0',
|
||||||
|
http_status = '200', http_response_size = 497,
|
||||||
|
http_response_time = 0.0006731})
|
||||||
|
assertEquals(patt.openstack_http:match(
|
||||||
|
'foo "OPTIONS / HTTP/1.0" status: 200 len: 497 time: 0.0006731 bar'),
|
||||||
|
{http_method = 'OPTIONS', http_url = '/', http_version = '1.0',
|
||||||
|
http_status = '200', http_response_size = 497,
|
||||||
|
http_response_time = 0.0006731})
|
||||||
|
end
|
||||||
|
|
||||||
function TestPatterns:test_ip_address()
|
function TestPatterns:test_ip_address()
|
||||||
assertEquals(patt.ip_address:match('192.168.1.2'),
|
assertEquals(patt.ip_address:match('192.168.1.2'),
|
||||||
{ip_address = '192.168.1.2'})
|
{ip_address = '192.168.1.2'})
|
||||||
|
Loading…
Reference in New Issue
Block a user