[bind10-dev] are static Logger objects safe?

Michal 'vorner' Vaner michal.vaner at nic.cz
Fri Jun 10 09:54:20 UTC 2011


Hello

On Thu, Jun 09, 2011 at 04:26:11PM -0700, JINMEI Tatuya / 神明達哉 wrote:
> I've just notice there are many (namespace scope) static Logger
> objects:
> 
> src/bin/resolver/resolver_log.cc:isc::log::Logger resolver_logger("resolver");
> src/lib/asiodns/io_fetch.cc:isc::log::Logger logger("asiolink");
> ...
> 
> In general such static objects can cause static initialization fiasco
> very easily and should be avoided whenever possible.  Are they really
> safe?

The documentation about the loggers suggests so, and I saw some tricks to make
it work, but I didn't look too closely. But AFAIK they are supposed to be safe.

Stephen might know more.

With regards

-- 
Anything is possible, unless it's not.

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/20110610/6b979aa1/attachment.bin>


More information about the bind10-dev mailing list