isis-group / isis

The ISIS project aims to provide a framework to access a large variety of image processing libraries written in different programming languages and environments.
GNU General Public License v3.0
17 stars 14 forks source link

Broken behavior of MessageHandlers #64

Closed Rollmops closed 12 years ago

Rollmops commented 12 years ago

When trying to set an own message handler by:

ENABLE_LOG( MODULE, MyHandler, level );

isis sometimes seems to ignore that handler. An example code for this:

ENABLE_LOG( DataLog, MyHandler, level); data::IOFactory::load("non_existing_file");

isis now should send an error log to MyHandler but still uses the DefaultMsgPrint as the handler.

If we change the code:

ENABLE_LOG( DataLog, MyHandler, level); LOG(DataLog, info) << "some message"; data::IOFactory::load("non_existing_file");

as we would expect, all messages are sent to MyHandler.

DerOrfa commented 12 years ago

Seems like newer versions of gcc break the Singleton class when optimizing. The Singleton cannot cross library boundaries anymore :-(

DerOrfa commented 12 years ago

140737cc0e5a8ad4f3851eaf1e59df6bab552c00 should fix this problem.