Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorTimo Besenreuther <timo.besenreuther@gmail.com>2015-01-17 17:13:47 +0300
committerTimo Besenreuther <timo.besenreuther@gmail.com>2015-01-17 17:13:47 +0300
commitd9f551bc0c0ec672404f49baa580f794c199a012 (patch)
tree58215d098f82d555d06bf95dbe30374f392a82e2 /misc
parent72af64bd3ccd1d9c1238c7c99319d48456377ad9 (diff)
Fixes #7045 Add parameter --title-category-delimiter to log importer
Diffstat (limited to 'misc')
-rwxr-xr-xmisc/log-analytics/import_logs.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/misc/log-analytics/import_logs.py b/misc/log-analytics/import_logs.py
index 7c3c067efa..5d663feb0f 100755
--- a/misc/log-analytics/import_logs.py
+++ b/misc/log-analytics/import_logs.py
@@ -600,6 +600,12 @@ class Configuration(object):
"in conjuction with --log-format-name=w3c_extended.\n"
"Example: --w3c-fields='#Fields: date time c-ip ...'"
)
+ option_parser.add_option(
+ '--title-category-delimiter', dest='title_category_delimiter', default='/',
+ help="If --enable-http-errors is used, errors are shown in the page titles report. If you have "
+ "changed General.action_title_category_delimiter in your Piwik configuration, you need to set this "
+ "option to the same value in order to get a pretty page titles report."
+ )
return option_parser
def _set_w3c_field_map(self, option, opt_str, value, parser):
@@ -1411,10 +1417,14 @@ class Recorder(object):
args['cvar'] = '{"1":["HTTP-code","%s"]}' % hit.status
if hit.is_error or hit.is_redirect:
- args['action_name'] = '%s/URL = %s%s' % (
+ args['action_name'] = '%s%sURL = %s%s' % (
hit.status,
+ config.options.title_category_delimiter,
urllib.quote(args['url'], ''),
- ("/From = %s" % urllib.quote(args['urlref'], '') if args['urlref'] != '' else '')
+ ("%sFrom = %s" % (
+ config.options.title_category_delimiter,
+ urllib.quote(args['urlref'], '')
+ ) if args['urlref'] != '' else '')
)
if hit.generation_time_milli > 0: