From d0e27fbcdc3884efa8d2825c12a7cf69bb1b7bf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20BEAU?= Date: Tue, 14 Mar 2017 10:53:14 +0100 Subject: [PATCH] [FIX] fix travis build --- logging_json/__openerp__.py | 2 +- logging_json/json_log.py | 14 +++++++------- requirements.txt | 1 + 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/logging_json/__openerp__.py b/logging_json/__openerp__.py index b8b0af2e8..505539042 100644 --- a/logging_json/__openerp__.py +++ b/logging_json/__openerp__.py @@ -3,7 +3,7 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) {'name': 'JSON Logging', - 'version': '9.0.1.0.0', + 'version': '8.0.1.0.0', 'author': 'Camptocamp,Akretion,Odoo Community Association (OCA)', 'license': 'AGPL-3', 'category': 'Extra Tools', diff --git a/logging_json/json_log.py b/logging_json/json_log.py index 1810c383e..0ed1edff3 100644 --- a/logging_json/json_log.py +++ b/logging_json/json_log.py @@ -24,30 +24,30 @@ except ImportError: def is_true(strval): return bool(strtobool(strval or '0'.lower())) + # The following regex are use to extract information from native odoo log # We struct is the following # {name_of_the_log : [regex, formatter, extra_vals]} # The extra_vals "dict" will be merged into the jsonlogger if the regex match # In order to make understandable the regex please add an string example that # match - REGEX = { 'openerp.addons.base.ir.ir_cron': [ # "cron.object.execute('db', 1, '*', u'base.action.rule', u'_check')" - ("cron\.object\.execute\('.+'(?P[\w.]+).+" - "'(?P[\w.]+)'\)", + (r"cron\.object\.execute\('.+'(?P[\w.]+).+" + r"'(?P[\w.]+)'\)", {}, {'cron_running': True}), # "0.016s (base.action.rule, _check)" - ("(?P[\d.]+)s \(" - "(?P[\w.]+), (?P[\w.]+)", + (r"(?P[\d.]+)s \(" + r"(?P[\w.]+), (?P[\w.]+)", {'cron_duration_second': float}, {'cron_running': False, 'cron_status': 'succeeded'}), # Call of self.pool.get('base.action.rule')._check( # cr, uid, *u'()') failed in Job 43 - ("Call of self\.pool\.get\('(?P[\w.]+)'\)" - ".(?P[\w.]+)", + (r"Call of self\.pool\.get\('(?P[\w.]+)'\)" + r".(?P[\w.]+)", {}, {'cron_running': False, 'cron_status': 'failed'}), ], } diff --git a/requirements.txt b/requirements.txt index c489fc0eb..6a43b64a1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,3 +4,4 @@ pysftp acme_tiny IPy + python-json-logger