You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-user@logging.apache.org by Curt Arnold <ca...@apache.org> on 2007/06/19 06:18:34 UTC

Re: Logger::getLogger(__FILE__) fails in release builds

On Jun 13, 2007, at 8:09 PM, jorrit de vries wrote:

> I am sorry, I forgot to mention I am using Visual Studio 2005 SP1  
> and a two months old SVN version of log4cxx.
>
>
> -----Original Message-----
> From: jorrit de vries [mailto:jorrit.devries@student.hu.nl]
> Sent: Thu 6/14/2007 3:07
> To: log4cxx-user@logging.apache.org
> Subject: Logger::getLogger(__FILE__) fails in release builds
>
> Hello,
>
> After a long search for why my application hang in Release builds  
> when using code like:
>
> LoggerPtr logger(Logger::getLogger(__FILE__))
>
> I would like to know why this is. Could anybody explain this to me?
>
>
> Best regards,
> Jorrit
>
>
Does the code still fail if __FILE__ is replaced with a string  
constant?  I don't know any circumstance where __FILE__ should  
evaluate to NULL, but getLogger(NULL) likely isn't well-behaved.  Do  
you have any stack-trace info?  Do the unit tests pass with the  
compiler?