Odoo - log archiving?

Andrius picture Andrius · Sep 19, 2014 · Viewed 11.2k times · Source

In older versions log archiving was on default and it would archive (mv older log to different log file) daily and kept archives for a week or so. Now on Odoo version 8, it puts everything on one log file and after some time it grows very big. It even takes some time to load that file. Is there a way to get old functionality in some way?

I have these lines in Odoo configuration file:

logfile = home/myuser/var/log/openerp/openerp-server.log
logrotate = True ;it seems to not do anything or I dont see what it does.

This is what I found for logging about Odoo configuration file (only for v7, so don't know how much it is relevant for v8):

# file where the server log will be stored
logfile = None

# do not rotate the logfile
logrotate = True

# Send the log to the syslog server
syslog = False

# setup a handler at LEVEL for a given PREFIX. An empty PREFIX indicates the root logger. This option can be repeated. Example: "openerp.orm:DEBUG" or "werkzeug:CRITICAL" (default: ":INFO")
log_handler = [':INFO']

# specify the level of the logging. Accepted values: info, debug_rpc, warn, test, critical, debug_sql, error, debug, debug_rpc_answer, notset
log_level = info

Answer

Andrius picture Andrius · Sep 30, 2014

It seems logrotate parameter works how I needed. At first I didn't notice it, maybe not whole 24h were not passed yet or (some time needed to archive log). But now I see it archives logs daily.