Closed DocCyblade closed 8 years ago
Config file makes sense to me. Partic if the user can find the log file after looking at the config file.
I agree we should keep the log file specified in Odoo. Like Jeremy to chime in on this
@JedMeister would like your input on this issue
TBH I don't think it matters too much (so long as logging works). IIRC you moved the PID handling out of the init already (handled direct by Odoo rather than the initscript). So it seems reasonable to me to move the log handling out too...
Like Landis said it may make finding the log file easier for some users to find (although many would probably look in /var/log first anyway).
The pid is still managed by the script due to issues we had with permissions. I think I'll see if I can get that to work so that Odoo manages most everything.
Ah ok... TBH I don't think that it matters too much so long as it is only managed in one place. Anything handled direct by Odoo will need to be owned by odoo; whereas anything handled by the initscript will be owned by root. So if both are trying to manage it you will have issues with permissions.
That's why it is often easier to allow the inistscript ot handle it (so root owns) as then you won't have any permission issues. Problems will occur if odoo handles the PID and the PID file gets deleted (as Odoo won't and shouldn't have blanket write permissions to /var/run
- or /run
which seems to be the more recent convention for some software).
@JedMeister - Once we get this back and stable, I'll look into this. I know Odoo can manage the file, but I think it deletes the file, and that was the issue. We shall see.
A workaround may be to
mkdir /var/run/odoo
chown -R odoo /var/run/odoo
TBH I don't think it's conventional but I don't think it's actually wrong (or even frowned on). But I could be wrong... :smile:
I thought about that as well and was one of the things I was going to look at.
To update a previous point; it seems to be quite acceptable to create a sub dir in /var/run
when a non-root user requires write access...
There are two ways to call out the Odoo log file. One in the config file and two on the command line.
Right now the log file is specified in the init script
I think we should look at moving it out to the config file.
Thoughts?