Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re^2: Test::Trap + Log::Dispatch under Cron

by Solo (Deacon)
on Nov 25, 2014 at 20:40 UTC ( #1108394=note: print w/replies, xml ) Need Help??

in reply to Re: Test::Trap + Log::Dispatch under Cron
in thread Test::Trap + Log::Dispatch under Cron

Well, the screen output is definitely writing to STDOUT, at least according to Test::Trap.

I've taken an approach similar to Test::Log::Dispatch and added a code output that appends all messages to an array. I'm not getting the logs with Test::Trap anymore, but it's not a complete change to the rest of the testing approach by needing to read a temp logfile.

our @log; $logger->add( Log::Dispatch::Code->new( min_level => 'debug', code => +sub { my %entry = @_; push @log, $entry{message}; }};

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1108394]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2022-05-22 12:16 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (80 votes). Check out past polls.