Boost logo

Boost Users :

Subject: Re: [Boost-users] [log] BOOST_LOG_GLOBAL_LOGGER_* in DLL
From: Nat Goodspeed (nat_at_[hidden])
Date: 2014-03-20 03:17:54

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.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at