Use the new format_to_name dict
authorJoshua Kugler <joshua@azariah.com>
Wed, 22 Jun 2011 04:34:07 +0000 (20:34 -0800)
committerJoshua Kugler <joshua@azariah.com>
Wed, 22 Jun 2011 04:34:07 +0000 (20:34 -0800)
apachelog.py

index 021b00e45a19cfeb603b059d439ce35ad8d7eb84..4bab6e391c5d314e358971cacfc2ca4518a750db 100755 (executable)
@@ -290,7 +290,10 @@ class parser:
 
         Takes and returns a string fieldname
         """
-        return name
+        try:
+            return self.format_to_name[name]
+        except KeyError:
+            return name
 
     def pattern(self):
         """