diff options
author | diosmosis <benaka@piwik.pro> | 2015-02-26 21:39:50 +0300 |
---|---|---|
committer | diosmosis <benaka@piwik.pro> | 2015-02-26 21:40:02 +0300 |
commit | b263d325ac23ad2b4b0d4c6ac66ffb0538d7c33f (patch) | |
tree | d6d95c84f6f6700e7e5801a37a4b557e3ca8e1ef /misc | |
parent | b8a1d564378eddab7f00cd0d64250f46d60a8090 (diff) |
Fixes #7300, add option --replay-tracking-expected-tracker-file to allow users to override expected path suffix for replay tracking requests.
Diffstat (limited to 'misc')
-rwxr-xr-x | misc/log-analytics/import_logs.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/misc/log-analytics/import_logs.py b/misc/log-analytics/import_logs.py index 55ec11d4df..ddedee880b 100755 --- a/misc/log-analytics/import_logs.py +++ b/misc/log-analytics/import_logs.py @@ -567,6 +567,11 @@ class Configuration(object): help="Replay piwik.php requests found in custom logs (only piwik.php requests expected). \nSee http://piwik.org/faq/how-to/faq_17033/" ) option_parser.add_option( + '--replay-tracking-expected-tracker-file', dest='replay_tracking_expected_tracker_file', default='piwik.php', + help="The expected suffix for tracking request paths. Only logs whose paths end with this will be imported. Defaults " + "to 'piwik.php' so only requests to the piwik.php file will be imported." + ) + option_parser.add_option( '--output', dest='output', help="Redirect output (stdout and stderr) to the specified file" ) @@ -2014,7 +2019,7 @@ class Parser(object): if config.options.replay_tracking: # we need a query string and we only consider requests with piwik.php - if not hit.query_string or not hit.path.lower().endswith('piwik.php'): + if not hit.query_string or not hit.path.lower().endswith(config.options.replay_tracking_expected_tracker_file): invalid_line(line, 'no query string, or ' + hit.path.lower() + ' does not end with piwik.php') continue |