|
From: Mike S. <m...@pe...> - 2004-04-16 17:21:33
|
Tim...@HV... wrote on 4/15/2004, 7:58 AM:
> I wonder how log4perl can be integrated with test scripts.
> In my tests I would like to intentionally cause a logdie. How could I
> catch
> such this with a test script.
Not sure if I understand correctly, but if you'd like to call logdie()
and verify it really would have caused the process to die, you can
either catch it with eval {} or install a $SIG{__DIE__} handler. Check
out the test cases in t/024WarnDieCarp.t in the Log::Log4perl distro.
--
-- Mike
Mike Schilli
m...@pe...
|