[bind10-dev] Questions on the Logging API

Danny Mayer mayer at ntp.org
Tue Feb 1 14:11:49 UTC 2011


On 12/17/2010 7:05 AM, Stephen Morris wrote:
> On 17 Dec 2010, at 09:43, Michal 'vorner' Vaner wrote:
> 
> Hello
> 
>> Reading the wiki page, I have few notes. First, what I think we want:
>> • We want to be able to grep the source code for the message or code or
>>  something (eg, what part of code did produce this message).
> 
> Each message should include something that does not change, even if
the text of the message does (this will allow support to trace any
problems). So messages would be of the form:
> 
>    MULQNAME: a question section may have only one qname, packet received that has 6
> 
> The identifier of the message is also the symbol name, so the the
relevant statement that generates it would be something like:
> 
> log.error(DLB_MULQNAME, nquestion);
> 
> ... and a grep for MULQNAME will identify the section of code. As
> the
idea of symbolic names for the messages might be seen as too much like
VMS or Windows, we could go for numeric identifiers, e.g.
> 
>    DLB1023:  a question section may have only one qname, packet received that has 6
> 

VMS included a severity level and that is essential for logging, so when
you call the logging facility it should include the severity level. I
don't think that having methods for each type of severity is a good
idea, it's too inflexible. At some point you may want to create a trace
severity level which not defined anywhere else.

Sorry to come into this conversation so late, I've been snowed under
with work lately and I'm way behind in my email.

Danny



More information about the bind10-dev mailing list