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:
authorBenaka Moorthi <benaka.moorthi@gmail.com>2013-09-25 05:27:52 +0400
committerBenaka Moorthi <benaka.moorthi@gmail.com>2013-09-25 05:28:21 +0400
commit1fac8e8e5c004b0c44abbd89c894ffc3b4120d0a (patch)
treee268ec375ebee22a0d3d59555008be16129e30e7 /misc
parentdcd8679c4f27090a92980f16b6b0a20365ff315f (diff)
Fixes #4045, fail log importer if we cannot match a format to the first line of the logfile.
Diffstat (limited to 'misc')
-rwxr-xr-xmisc/log-analytics/import_logs.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/misc/log-analytics/import_logs.py b/misc/log-analytics/import_logs.py
index 5c1ed51c2a..57d7415f2c 100755
--- a/misc/log-analytics/import_logs.py
+++ b/misc/log-analytics/import_logs.py
@@ -1351,9 +1351,12 @@ class Parser(object):
else:
logging.debug('Format %s does not match', name)
- if format:
- logging.debug('Format %s is the best match', format.name)
+ if not format:
+ fatal_error("cannot determine the log format using the first line of the log file. Try removing it" +
+ " or specifying the format with the --log-format-name command line argument.")
+ return
+ logging.debug('Format %s is the best match', format.name)
return format
def parse(self, filename):