Closed oxij closed 6 years ago
Why do you want to put debug messages to standard error stream? Error messages are already being sent to the stderr, as well as to the stdout.
This duplicates error messages. There is already
fprintf()
that writes to stderr half a dozen lines earlier.
Oops, right.
being sent to the stderr, as well as to the stdout.
Yes, this is incorrect in that it duplicates the messages. I made this patch with sed :)
However, my problem with the state before this patch is that since some messages get sent to stdout instead of stderr, apps that draw with ncurses get pretty ugly with tracing enabled. And the ncurses' redraws erase the debugging info from the view.
I think everything should always be sent to stderr.
Also, a little thing I made you might be interested in: https://github.com/oxij/libcardiacarrest
Unrelated to this PR but strongly related to apulse
.
I don't like the idea of using stderr exclusively. It definitely will be an inconvenience for me during coding/debugging.
But still, I pushed 0bd2288d7cae26876ecb44e22d9f188dee6c41d5 to the master
branch. It's not what you wanted to merge, but if you want to log to the stderr
, you need to patch only the line where log_to_stderr
flag is set.
I think it's possible to make it configurable at run time. Haven't decided how yet.
you might be interested in: https://github.com/oxij/libcardiacarrest
Sometimes I regret I made apulse
available. For some reason some people believe that I share their hatred towards PulseAudio. Which is not the case.
I think it's possible to make it configurable at run time. Haven't decided how yet.
I would be perfectly happy with an official compile time option I can use when packaging, like "-DLOG_TO_STDERR=1" or something similar.
you might be interested in: https://github.com/oxij/libcardiacarrest
Sometimes I regret I made
apulse
available. For some reason some people believe that I share their hatred towards PulseAudio. Which is not the case.
I find it hard to believe that one can read PA's source and still be like "nah, its fine, it totally makes sense". But, well, okay, opinion noted, I guess.
I think libcardiacarrest
provides useful service even if you don't hate PA, though.
like "-DLOG_TO_STDERR=1"
Why not. Added in 0be73093ee7996d4470c01fd152029bdf61ddaf0.
I find it hard to believe that one can read PA's source and still be like "nah, its fine, it totally makes sense".
You didn't look into apulse's source code, did you? :grinning:
Rinat Ibragimov notifications@github.com writes:
Why not. Added in 0be73093ee7996d4470c01fd152029bdf61ddaf0.
Perfect. Thank you. You can close this, or I will the next time I login into GitHub.
You didn't look into apulse's source code, did you? :grinning:
I did. The lack of library-to-daemon protocol handling makes this considerably better.
It's a bad idea to write debug output to stdout, it gets lost there.