# Daemonizing closes all fds, so must be before log init. # (Which means it's hell to tell why it later aborts.) if ($daemonize) { Proc::Daemon::Init(); } open (my $xxx, ">/nfshome/ddb/p/kcmdproxy/elog.log") or die "Open failed: $!"; print $xxx "opened log file\n"; # Higher-level non-error logging level Log::Log4perl::Logger::create_custom_level('NOTIFY', 'ERROR'); print $xxx "log init a\n"; Log::Log4perl->init_and_watch($logconfig, 'HUP'); print $xxx "log init b\n";