[bind10-dev] Log output in case of wrong placeholders

Michal 'vorner' Vaner michal.vaner at nic.cz
Sun May 8 20:25:00 UTC 2011


If you look at ticket #901, me and Stephen have different views on what is
better when a placeholder is missing in the log message.

I think that the logging library should write a notice about it and include the
value it wanted to put into the placeholder. An example would be a typo in the

There are %2 messages waiting

Note that the placeholder should be %1, as we have only one argument. Now it
would output:

There are %2 messages waiting @@Missing placeholder %1 for '42'@@

The theory is it is easy to make a mistake in the translation and unless someone
reads the output of the logger, it is not apparent it is wrong. So we at last
output the value in the error message and hope that humans can guess a little.

Stephen says there might be valid reasons not to include the placeholder
sometimes, for example it may be useless in some language (see example with
sheep in #901).

So, what do you think, should we optimise it for not losing information or for
nicer outputs?

Thank you

Hallowed be the zeroes and ones

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/20110508/67b3e58c/attachment.bin>

More information about the bind10-dev mailing list