Subject: | --background clobbers log |
Date: | Wed, 8 Feb 2012 09:34:59 -0800 |
To: | bug-Catalyst-Runtime [...] rt.cpan.org |
From: | Seth Daniel <catalyst [...] sethdaniel.org> |
Hello,
I'm still working on a small program that demonstrates this, but here is
a problem I am seeing:
Catalyst 5.90007
Log::Log4perl 1.35
CatalystX::Script::Server::Starman 0.01
MooseX::Daemonize 0.13
I setup logging in my app as suggested in the Catalyst::Log perldoc:
__PACKAGE__->log( Log::Log4perl::Catalyst->new('log.conf') );
__PACKAGE__->setup;
I then start the server with a script that looks like:
BEGIN {
$ENV{CATALYST_SCRIPT_GEN} = 40;
}
use Catalyst::ScriptRunner;
Catalyst::ScriptRunner->run('MyApp', 'Server');
And that script load another module that loads
CatalystX::Script::Server::Starman and eventually starman starts.
package MyApp::Script::Server;
use Moose;
extends 'CatalystX::Script::Server::Starman';
1;
__END__
All of this works. However, when I specify --background and --pidfile
the logging will be sent to the pidfile after startup (startup logging
goes to the file specified in log.conf; all following logging gets sent
to the pidfile). If --background is specified without --pidfile I have
no idea where the logging gets sent, but it doesn't get sent to the
log file specified in log.conf.
Anybody else seen this or have any idea what's going on? I'm currently
working on a small program that demonstrates this but it may be a day
before I can really get to that.
Thanks for any assistance.
--
seth /\ sethdaniel.org