You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my mind I'm thinking about an Output object that is aware of verbosity with in write or writeln or better yet some interface that extends OutputInterface that introduces writeVerbose() etc.
Then the example would be something like:
$hostname = $node->run('something but I don't care about the output, unless verbose');
$output->writeln($hostname, VERBOSE);
// or
$output->writeVerbose($hostname);
Obviously if I never cared about the output unless it failed, just $node->run('something that I don't care about unless it fails');
I did think about injecting Output into Node (thus wrapping Process->getOutput() directly), but I feel like it shouldn't care. Since in all the examples it's the programmer that cares.
Not thought about multi-threaded node->run() you'll have to walk me through it.
Output is already aware of verbosity, see https://github.com/symfony/Console/blob/master/Output/OutputInterface.php#L58 I'm just considering hooking the output stream from the Process to the OutputInterface. This is really handy for debugging when you are writing Commands / Tasks etc to see what is actually happening. A solution I have been considering is exposing the underlying Process object from the Node\Remote however that would mean the user would need to understand the underlying implementation (unlike a Node\Local where the command is executed as the process, a Node\Remote actually streams the user's command into the STDIN of an ssh process)
When running
tempo -v <command>
we should see output from the$node->run($cmd);
calls.This will probably require re-architecture of the way nodes use
Process
.Adding support for multi-threaded
$node->run($cmd)
from theCommand
will also affect this re-architecture.The text was updated successfully, but these errors were encountered: