[bind10-dev] Questions on the Logging API

Michal 'vorner' Vaner michal.vaner at nic.cz
Sat Dec 18 10:03:58 UTC 2010


Hello

On Fri, Dec 17, 2010 at 04:12:55PM +0000, Stephen Morris wrote:
> > I probably missed that one in the article. But then, wouldn't it be better to
> > just have 2 parameters for the logging function? We don't need to compress it
> > that much (and if we wanted, we could have the parameters 16bit, but using
> > unsigned, no matter what it is on the platform, seems OK). I think it would be
> > more readable to write it that way and less error prone.
> 
> We can do, but why not combine the facility and error number into one symbol? We can even name the symbol to include facility, e.g. DLB_MULQNAME (DLB = DNS Library).

Because then it is much easier to do it wrong, I guess. It would be possible to
create DBL_MULQNAME that would have the number of auth server and it would be
hard to spot in the code. And because it is two parts of information, it seems
cleaner to separate them, even more when there's no real reason to put them
together (or, I don't see the reason why to complicate things by combining
them).

Have a nice day

-- 
The cost of living is going up, and the chance of living is going down.

Michal 'vorner' Vaner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/bind10-dev/attachments/20101218/a50e1608/attachment.bin>


More information about the bind10-dev mailing list