Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Print log at runtime instead of dumping all at once later

by RichardK (Parson)
on Jul 02, 2015 at 07:47 UTC ( [id://1132923]=note: print w/replies, xml ) Need Help??


in reply to Print log at runtime instead of dumping all at once later

Well of course it buffers, you collect all the output from the remote command into a string and then print it. What else is it going to do ? Try using pipe_out instead.

my ($stdout, $errput) = $ssh->capture2("~/release/$wrapper"); printf "Output: $stdout\n" if $stdout;

Replies are listed 'Best First'.
Re^2: Print log at runtime instead of dumping all at once later
by Technext (Acolyte) on Jul 02, 2015 at 17:03 UTC
    Yes RichardK, i know that i'm collecting the output in a string and thus, it'll print only after completion. :) I was looking for a way where i could instead print logs at runtime. Thanks for the suggestion! :) I was looking for pipe_out but salva's comment did the trick.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-04-25 06:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found