diff options
author | mattab <matthieu.aubry@gmail.com> | 2014-02-05 00:52:12 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2014-02-05 00:52:12 +0400 |
commit | 63f1ce69c474824e897ae421be68d057b8b5da14 (patch) | |
tree | 4ac127ad164e452b90170fefa68b8552b53d610d /misc | |
parent | f55faa82973b933ec4a7285a41a37718b50b9695 (diff) |
Fixes #4628 --enable-bots now works as expected + our importLogs integration test shows that this wasn't working before.
Diffstat (limited to 'misc')
-rwxr-xr-x | misc/log-analytics/import_logs.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/misc/log-analytics/import_logs.py b/misc/log-analytics/import_logs.py index 6a417acd8d..7909edcf04 100755 --- a/misc/log-analytics/import_logs.py +++ b/misc/log-analytics/import_logs.py @@ -1239,11 +1239,14 @@ class Recorder(object): if hit.is_download: args['download'] = args['url'] - if hit.is_robot: - args['_cvar'] = '{"1":["Bot","%s"]}' % hit.user_agent - elif config.options.enable_bots: - args['_cvar'] = '{"1":["Not-Bot","%s"]}' % hit.user_agent + + if config.options.enable_bots: args['bots'] = '1' + if hit.is_robot: + args['_cvar'] = '{"1":["Bot","%s"]}' % hit.user_agent + else: + args['_cvar'] = '{"1":["Not-Bot","%s"]}' % hit.user_agent + if hit.is_error or hit.is_redirect: args['cvar'] = '{"1":["HTTP-code","%s"]}' % hit.status args['action_name'] = '%s/URL = %s%s' % ( |