Hi Frank,
In version 2.4.0 of opensees, I am able to close the standard output and standard error and redirect them into separate files. In version 2.4.6 it does not work correctly, all output seems to go to the standard error channel. Can this behavior be reverted to the original behavior? I think the change was introduced in revision 5532. The following code snippet is what I use to redirect the output:
[code]
close stdout
set foutID [open $dataDir/output.out w+]
fconfigure $foutID -buffering none
#set stderrID [dup stderr]
close stderr
set ferrID [open $dataDir/output.err w+]
fconfigure $ferrID -buffering none
[/code]
The dup command, if it works (an extra tcl package is needed to my understanding), is to show the output to the screen and record into the file.
Thanks
AN
PS. How can I enable BBCode in the posts?
Redirecting stdout/stderr
Moderators: silvia, selimgunay, Moderators
Re: Redirecting stdout/stderr
the problem with differntiating between stderr and stdout was that the opensees classes need to send everything to stderr, even when there was no error. when i had the puts go to stdout and everything going to stderr I had complaints. Ultimately we need to provide the classes with an opserr and opsout that they can use to dfferentiate between the two.
Re: Redirecting stdout/stderr
as it is only puts that would go to stdout .. you could do what you were doing before by adding the fileID to the puts command