prepended [Verbose] to vecho, and [Debug] to vvecho. - #46
Conversation
Simplified logic used to debug a single special case, and removed decho
|
I haven't tested it yet but this commit looks ok to me. I'd be more inclined to remove deprecated code rather than commenting it. Once I test it (maybe not today) I will take this. |
|
I tested this patch:
|
|
so.. abcde. Pull one thread and many bells ring. I've ripped a few more CDs have tweaked the patch along the way. I still haven't tested the PIPE work but think changing from decho to vvecho and retaining the redirect to FD4 is safer (though it's not exactly the same, not sure if it matters whether redirection happens before the command). |
|
I'll remove the decho part from this one, focusing this on just the prepending of [Verbose] or [Verbose2]. I take it from your diff above that the vecho -n does not have the intended effect of suppressing the new line. The redirect to FD4 seems immaterial, given this: But I will try some testing to see if I can better understand that as part of a pull request focused on the decho change. |
and -c for continue on same line. This allows for more flexible output formatting. Found only one instance where vecho -n really should have suppressed the newline. The other three instances did not appear to need the newline suppression. Added a new directory for test-snippets which may prove useful for isolated testing of code. Log-testing.sh also includes a proposed change to allow for migration (gradual) from echo=>log. That change would be in a future pull request, if it makes sense to do so. It is not part of this pull request.
|
Pull request updated with changes as descibed in the commit. And sorry about the 'mac-ism' in the shebang line... |
added the prepended level information to help make better sense of the console output.
Simplified logic used to debug a single special case, and removed decho
This is the first pass to deal with issues 1 and 2 as described in #45.
decho was only used for one very niche debug case:
when setting the command line option -z to enable CDROMREADERSYNTAX=debug
simplified the logic and eliminated (commented out) the unneeded decho() function.
Not a complete solution as it does an
echo [DEBUG], but that can later be turned intolog debugif/when the log function is expanded to handle that case. -- a POSSIBLE way of handling the output in a more controlled fashion... but that might also need a local override of the EXTRAVERBOSE variable to ensure the output.I think this might be a reasonable first pass.