Boost logo

Boost Users :

Subject: Re: [Boost-users] [log] BOOST_LOG_GLOBAL_LOGGER_* in DLL
From: Michael Marcin (mike.marcin_at_[hidden])
Date: 2014-03-20 20:34:51


On 3/20/2014 7:27 PM, Michael Marcin wrote:
>
> Specifically I have boost Log compiled as a static library but I'm only
> using boost.log from a single dll so from my reading of that guideline
> it doesn't apply.

In the meantime I've just changed to using a function local static and
relying upon c++11 magic statics to make it's initialization safe.

i.e.

logger_type& my_logger()
{
     static logger_type lg;
     return lg;
}

BOOST_LOG_SEV( my_logger(), ... )


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net