diff options
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) |
