Page 1 of 1

Anyway to filter output as stdout or stderr?

Posted: Tue 04 Oct 2011 08:23
by Memnarch
Hello,
Iam new to SecureBridge and tried the trial.
So far i havent found a way to see if an output message is from stdout or stderr.

Currently looking for SHH components in Delphi and Securebridge is one of the components iam testing for an upcoming project. Other components feature an extra stream for stdout and stderr. Its important for me to know if a message is from stderr.

I could pipe the stderr to a file and read that, but thats a not so nice workaround.

Server is Using OpenSSH(Debian)


Greetings
Memnarch

Posted: Wed 05 Oct 2011 10:21
by Dimon
At the moment SecureBridge does not support output message is from stdout or stderr. The TScSSHClient and TScSSHChannel components proccess all necessary inforamtion and raise error in appropriate situations. Please describe in more details what infomation you can process using these streams.

Posted: Fri 07 Oct 2011 11:34
by Memnarch
Please describe in more details what infomation you can process using these streams.
Hope i understood the question^^"

For example IPWorks' component has a stream for STDerr and STDout.
After executing a command, i can read those streams seperated.
The stderr only contains all error messages from the SSH-Shell
The stdout only contains non stderr messages from the SSH-Shell

Quite usefull when i need to know if an error ocured to give feedback, since exitcode only contains the code from the command.
Or for logging.

Dont know how they did it(maybe they pipe it to a temporary file, too?)

Posted: Tue 11 Oct 2011 09:23
by Dimon
To get data from the stdout stream you can use the TScSSHShell.ReadString or TScSSHShell.ReadBuffer methods.

At the moment SecureBridge does not support output message from stderr. We will investigate the possibility of adding this functionality in the future.