logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Assaf Lavie <assafla...@gmail.com>
Subject Caching LoggerPtr using local statics (the singleton pattern)
Date Tue, 26 May 2009 08:37:57 GMT
My program always crashes when I try to cache the LoggerPtr returned from
getLogger in a local static variable (i.e. singleton) like this:
LoggerPtr MyLogger()
{
  static LoggerPtr singleton =
log4cxx::LogManager::getLogger("some.logger");
  return singleton;
}


I assume this happens because of some APR related effect. Can someone please
shed light on this? Does this happen to you?

Mime
View raw message