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 jorrit de vries <jo...@student.hu.nl> on 2007/06/14 03:07:56 UTC

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

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

Posted by Curt Arnold <ca...@apache.org>.
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?



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

Posted by jorrit de vries <jo...@student.hu.nl>.
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


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

Posted by Curt Arnold <ca...@apache.org>.
On Jun 13, 2007, at 8:07 PM, jorrit de vries wrote:

> 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
>
p.s.: Using __FILE__ as a logger name would make your logger names  
dependent on the developer's choice of compilers and/or root  
directories.  Many compilers provide the full path for __FILE__ (but  
not apparently VC8 unless you set a compatibility option).