r"
^(?P<timestamp>.{19})\ \[(?P<severity>\w{4,6})\]
\ \d+\#\d+:\ (\*\d+\ )?
(?P<err_msg>
(?:\"\S+\"\sis\snot\s)?
(?P<err_type>\w+)[\s(]
(?:requests,\ excess:\ (?P<err_rate>\d+\.\d+)
\ by\ zone\ \"(?P<err_zone>\S+)\"
|.+?)
)
(?:
,\ client:\ (?P<remote_addr>\d+\.\d+\.\d+\.\d+)
,\ server:\ (?P<server>[^,\a]+)
(?:,\ request:\ \"(?P<method>[A-Z]{3,4}?)
\ (?P<uri>\/\S*?)(?P<uri_query>\?\S+)?
\ (?P<protocol>\S+)\"
)?
(?:,\ upstream:\ \"(?P<upstream>.+?)\")?
(?:,\ host:\ \"(?P<req_host>\S+)\")?