diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-05-08 18:12:03 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-05-08 18:12:03 +0200 |
| commit | f2e105eeca409e55be0408edcc986b39fd026094 (patch) | |
| tree | 7c5c581d5c2ffe76bcdc3d8278a54fc542390dd9 /odoo/netsvc.py | |
| parent | 652e336deb1846a64abb5e2032864d5e17bf03b6 (diff) | |
| parent | d3a040cebe11c30697aebbafeb7d52888d3bff70 (diff) | |
[MERGE] forward port branch saas-15 up to d3a040cebe1
Diffstat (limited to 'odoo/netsvc.py')
| -rw-r--r-- | odoo/netsvc.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/odoo/netsvc.py b/odoo/netsvc.py index 7772d7d47cd..c8d9dbb6441 100644 --- a/odoo/netsvc.py +++ b/odoo/netsvc.py @@ -119,6 +119,13 @@ def init_logger(): if dirname and not os.path.isdir(dirname): os.makedirs(dirname) if tools.config['logrotate'] is not False: + if tools.config['workers'] > 1: + # TODO: fallback to regular file logging in master for safe(r) defaults? + # + # Doing so here would be a good idea but also might break + # situations were people do log-shipping of rotated data? + _logger.warn("WARNING: built-in log rotation is not reliable in multi-worker scenarios and may incur significant data loss. " + "It is strongly recommended to use an external log rotation utility or use system loggers (--syslog) instead.") handler = logging.handlers.TimedRotatingFileHandler(filename=logf, when='D', interval=1, backupCount=30) elif os.name == 'posix': handler = logging.handlers.WatchedFileHandler(logf) |
