Warning, debugging, and tracing
rra at stanford.edu
Mon Mar 18 01:30:39 UTC 2002
Jeffrey M Vinocur <jeff at litech.org> writes:
> On Sun, 17 Mar 2002, Russ Allbery wrote:
>> trace() Possibly verbose trace information, either tracing the
>> protocol or tracing the code. By default there is no
>> handler, so everything sent to trace() is ignored, but
>> that can be changed at run-time.
> ...changed at run-time with some granularity, hopefully. (e.g., per
> program or module.)
> For example, I'd be happy to log readers.conf processing to news.debug
> all the time, but doing that results in tons of other stuff I don't care
> about being logged as well.
Hm. The first thing that comes to mind for a way to do that is to create
an enum of types of traces, and then have programs enable or disable those
traces by type.
That requires centrally assigning a list of tracing types, though, which
to some degree violates layering between applications (in other words,
inn/messages.h would probably need to have the enum definition that
includes all the tracing types from all the programs and libraries that
Another alternative would be to use string values, which would be a bit
more flexible but slower and involving larger data structures on the
handler side of things.
Russ Allbery (rra at stanford.edu) <http://www.eyrie.org/~eagle/>
Please send questions to the list rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
More information about the inn-workers