Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: printing to STDOUT and a Logfile

by rbc (Curate)
on Oct 29, 2002 at 00:39 UTC ( #208644=note: print w/ replies, xml ) Need Help??

in reply to printing to STDOUT and a Logfile

This is the way I do it. It my be too simple for all your logging needs.

perl -e 'print "Hello\n";' | tee logfile
... or If I also want to trap STDERR I do ...
perl -e 'print "Hello\n;' >& logfile
... but then again does logging need to be complicated?

Comment on Re: printing to STDOUT and a Logfile
Select or Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://208644]
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: (4)
As of 2015-11-26 18:36 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (705 votes), past polls