From: Joshua Kugler Date: Sat, 9 Jul 2011 04:31:31 +0000 (-0800) Subject: Clarified parameter name X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5fbd1163a281b32826d71399e268f5bf3dce9892;p=apachelog.git Clarified parameter name --- diff --git a/apachelog.py b/apachelog.py index d38476c..9b1f8dc 100755 --- a/apachelog.py +++ b/apachelog.py @@ -169,6 +169,7 @@ class parser: # otherwise an empty string) '%q':'query_string', # First line of request + # e.g., what you'd see in the logs as 'GET / HTTP/1.1' '%r':'first_line', # The handler generating the response (if any). '%R':'response_handler', @@ -204,7 +205,7 @@ class parser: '%O':'bytes_sent', } - def __init__(self, format, use_names=False): + def __init__(self, format, use_friendly_names=False): """ Takes the log format from an Apache configuration file. @@ -217,7 +218,7 @@ class parser: self._names = [] self._regex = None self._pattern = '' - self._use_names = use_names + self._use_friendly_names = use_friendly_names self._parse_format(format) def _parse_format(self, format): @@ -249,7 +250,7 @@ class parser: element = lstripquotes.sub('', element) element = rstripquotes.sub('', element) - if self._use_names: + if self._use_friendly_names: self._names.append(self.alias(element)) else: self._names.append(element)