Re: [Csnd] Logging (-0) removed in Csound 5?
Date | 2005-09-22 15:14 |
From | Michael Gogins |
Subject | Re: [Csnd] Logging (-0) removed in Csound 5? |
In my view, the decision to remove logging was correct. It should always be possible to redirect stderr and/or stdout to a file. This is a standard practice with many programs on all platforms. What are the objections to this maintenance-free and effective solution? Regards, Mike -----Original Message----- From: Istvan Varga |
Date | 2005-09-22 16:07 |
From | David Akbari |
Subject | Re: [Csnd] Logging (-0) removed in Csound 5? |
On Sep 22, 2005, at 10:14 AM, Michael Gogins wrote: > It should always be possible to redirect stderr and/or stdout to a > file. This is a standard practice with many programs on all platforms. > You know, it's funny you mention that. For example, if I try doing [localhost:~] ls -a > list.txt I get the directory contents in a text file, as expected. However if I do [localhost:~/csoundpath] ./csound -z1 > cs_opcodes.txt Csound5 (Sept 21 2005) outputs a blank text file with the opcode list to the console window. Is this as expected? Ideally I would want the information to just go straight to the text file and not ever appear in the Terminal window. Of course it is no problem to copy / paste the output but it is one more potentially time saving step ... -David -- Send bugs reports to this list. To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk |
Date | 2005-09-22 16:13 |
From | Steven Yi |
Subject | Re: [Csnd] Logging (-0) removed in Csound 5? |
Attachments | None |
Date | 2005-09-22 16:20 |
From | Istvan Varga |
Subject | Re: [Csnd] Logging (-0) removed in Csound 5? |
David Akbari wrote: > [localhost:~] ls -a > list.txt > > I get the directory contents in a text file, as expected. However if I do > > [localhost:~/csoundpath] ./csound -z1 > cs_opcodes.txt > > Csound5 (Sept 21 2005) outputs a blank text file with the opcode list to > the console window. Now try [localhost:~/csoundpath] ./csound -z1 2> cs_opcodes.txt However, I do have logging implemented in my (not yet committed) sources, so you may expect that feature to return eventually; of course, unless everyone agrees to remove logging completely. -- Send bugs reports to this list. To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk |
Date | 2005-09-22 16:40 |
From | David Akbari |
Subject | Re: [Csnd] Logging (-0) removed in Csound 5? |
On Sep 22, 2005, at 11:13 AM, Steven Yi wrote: > You might need to do: > > csound -z1 &> cs_opcodes.txt > > as I think csound prints to stderr. > > steven > > In a tcsh shell it returns: tcsh: Invalid null command. but it works as expected in a bash shell. On Sep 22, 2005, at 11:20 AM, Istvan Varga wrote: > Now try > > [localhost:~/csoundpath] ./csound -z1 2> cs_opcodes.txt > Again, this works in a bash shell but not in tcsh. It is more elegant in that it does not return an error in tcsh but just outputs to stdout. > so you may expect that feature to return eventually; of course, unless > everyone agrees to remove logging completely. For the most part I agree with Michael Gogins' suggestion of preferring to use the OS's redirect file output syntax, however on Mac OS9 for example there is no console, so unless Csound explicitly outputs the strings it would print to stdout to a file, it would be impossible to get a log (of course some AppleScript could likely do the trick...). Likely some flavours of BSD would be affected as well, where this type of redirection may not be possible. However to reiterate I would think it would be a wiser choice to sacrifice the feature over having to re-write sections of the API, as Windows, OSX, and most *nix can do this type of stdout redirection. In large part I couldn't agree more with the following statement. On Sep 22, 2005, at 11:36 AM, Michael Gogins wrote: > I think Csound should focus its development effort on music unless > absolutely required to do something else. Just my humble opinion. -David -- Send bugs reports to this list. To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk |
Date | 2005-09-22 17:23 |
From | Anthony Kozar |
Subject | Re: [Csnd] Logging (-0) removed in Csound 5? |
Michael Gogins wrote on 9/22/05 10:14 AM: > In my view, the decision to remove logging was correct. It should always be > possible to redirect stderr and/or stdout to a file. This is a standard > practice with many programs on all platforms. This is incorrect. Not all platforms have Unix-like facilities or even command-line interfaces! MacOS 9 does not allow the redirecting of stderr and stdout as it does not really have these concepts. Other platforms that Csound has run on in the past have also lacked these capabilities. And I would expect that there will be future platforms that people will want to use Csound on that also lack them (handhelds, maybe even cell phones, or something completely different). > What are the objections to this maintenance-free and effective solution? We cannot assume a Unix environment. But we have to assume a standard C library including |
Date | 2005-09-22 17:37 |
From | Anthony Kozar |
Subject | Re: [Csnd] Logging (-0) removed in Csound 5? |
> What are the objections to this maintenance-free and effective solution? The other thing that is useful about -O for logging messages is that you can put it in your |