True, but the log can become so noisy as to be useless for debugging
any other problem. It seems we have two conflicting needs.
What I've seen on other projects is for there to be groups of debug
print statements, with each group assigned one of 32 bits. These
were enabled at compile time for debugging in the lab rather than in
the field, but it could be done at run time, either as
a command-line argument or a function call. Such groups could be
given names instead of bits to make the UI friendlier and more
extensible.
Another, simpler approach would be to add a global, compile-time
macro that would be enabled for releases, but could be disabled by
a developer to quiet all those terminal-related calls to ch_log().
That would allow a developer wanting to use ch_log() for their own
purposes to simply add something like -DNOTERMDEBUG or -UTERMDEBUG
to the CFLAGS in their environment.
Regards,
Gary