Age | Commit message (Collapse) | Author |
|
We nil the internal variable, but we should not close the logger itself,
since this leads to STDERR being closed and the interpreter reopening it
for its own needs, or something like that, which ultimately leads to
the interpreter's warning appearing in console (probably due to ruby
itself reopening stderr to be able to output the messages).
If we simply nil the variable, the interpreter is content with sending
us the messages per our shenanigangs, and everything works just as
expected.
|
|
|
|
Overriding (as we should do) the standard error write method when
daemonizing introduces a recursion in the logger, due to the
persistent presence of the console logger.
The solution is obviously to stop logging on console
after daemonization.
|
|
Logging was broken when daemonizing, due to the logger thread being dead
after the fork. This can be solved by restarting the thread, if necessary
when setting the log file (which we conveniently do right after the fork).
|
|
|
|
This moves the logger management thread/queue to a seperate singleton.
It removes the explicit stopping/restarting of the logging thread since
the thread should behave like a daemon thread anyway.
Still needs to be tested to work in daemonize.
|