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 15:41:14


On 3/20/2014 2:17 AM, Nat Goodspeed wrote:
> On Mar 19, 2014, at 8:04 PM, Michael Marcin <mike.marcin_at_[hidden]> wrote:
>
>> I'm trying to use
>>
>> BOOST_LOG_GLOBAL_LOGGER_DEFAULT( my_logger, boost::log::sources::severity_logger_mt<boost::log::trivial::severity_level> )
>>
>> In a dll but it doesn't appear to be getting initialized.
>>
>> The first BOOST_LOG_SEV results in a crash due to core being null.
>>
>> How do I initialize a global logger in a DLL?
>
> Is it a "managed" DLL?
>
> This may no longer be relevant - but some years ago I was astonished (you might even say outraged) to discover that a "managed" DLL did not guarantee to initialize static "unmanaged" objects. I wondered how this could be called C++, since to me construction and destruction is one of the fundamental promises of the language.
>
> Apologies if this is completely irrelevant to your problem.
>>

Unfortunately it is not managed, but thanks for the tip in any event.


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