[bind10-dev] consider log4cplus for logging
Michal 'vorner' Vaner
michal.vaner at nic.cz
Wed Apr 27 18:29:49 UTC 2011
Hello
On Wed, Apr 27, 2011 at 05:27:30PM +0100, Stephen Morris wrote:
> For this reason, I suggest that instead of using "printf" format
> strings, we use something like "{n}" in a message string to signify a
> parameter (where 'n' is the position of the parameter in the argument
> list - i.e. a message would look something like "unable to send query to
> {1} due to {2}"). This would require a bit of extra work by the logging
> code in handling the substitutions, but as a side-effect it should avoid
> the problem outlined in (a) above.
Strange that the Qt folks got to the same conclusion (they have really nice
support for it in QString, one can write things like
QString("There are %1 people in the %2").arg(4).arg("Town")). So it makes me
think if it works for them, it should work for us.
Anyway, people might be more familiar with the % version, would it be problem to
use that?
But then we can't use variadic functions, because they don't provide the type
(or we would have to convert everything to strings before).
With regards
--
I left the ssh key under the doormat
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/20110427/a9c119cb/attachment.bin>
More information about the bind10-dev
mailing list