Reopening logs - why no relative paths?
normalperson at yhbt.net
Thu Mar 31 18:02:48 EDT 2011
Matthew Kocher <mkocher at pivotallabs.com> wrote:
> We just spend a couple hours trying to figure out why sending a USR1
> signal wasn't causing unicorn to reopen logs. Looking at the source
> reveals that only files opened with absolute paths are eligible for
> rotation, the others are silently skipped.
> We use the fairly standard practice of always logging to
> log/unicorn.error.log and creating symlinks to where we'd like the
> logs to live on individual hosts. We'll change our configs for the
> time being, but is there a reason to not reopen the relative paths?
It's ambiguous due to directory changes. It may be easier now that
we have the "working_directory" directive now, but configuration changes
also change (or unset) the "working_directory" which adds to the
We could try allowing it and see what happens, I suppose...
 - in my experience with writing daemons, directory changes make
everything much harder all around.
More information about the mongrel-unicorn