Msc...@ao... wrote:
> In a message dated 1/28/03 1:51:34 PM Pacific Standard Time,
> wi...@da... writes:
>
>> While developing an application I am hoping to use the
>> Proc::Daemon::Init module along with Log4perl, but it seems whenever I
>> use Proc::Daemon's Init function the log4perl logger does not work, I
>> am assuming because I am calling 'init' before Proc::Daemon has done
>> its thing, and in particular because of #6 below.
>
>
>
> Correct. If you close Log4perl's file descriptors, it won't be able to
> write to the log files which it opened at Log4perl init time (which I
> assume you've called *before* closing the file descriptors). You need to
> call Log::Log4perl->init(...) *after* closing open file descriptors.
>
Thanks. After commenting out a few various chunks of code I figured that
is what the problem was. I worked it out to call Log4perl's init after
the Proc::Daemon Init and it appears to work correctly.
> Will there be a problem with not having a controlling terminal
>
>> (can't see a reason for it, except in the case of trying to use a
>> Log::Dispatch::Screen appender, or the like).
>
> That's fine, in fact, that's a pretty standard setup for Log::Log4perl.
>
Sure seems like it would have to be, good to have confirmation though.
http://danconia.org
|