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 ts...@yahoo.com on 2009/06/30 09:18:57 UTC
File name and line numbers not working
Hi,
I'm using log4cxx on Linux with gcc, and I have a very simple setup:
static LoggerPtr logger(Logger::getLogger("main"));
BasicConfigurator::configure();
LOG4CXX_INFO(logger, "Entering application.");
This results in the following log line:
0 [0x7fba18564770] INFO main null - Entering application.
As
you can see, the file name and line number are missing (it's showing
null instead). When I run a simple "cout << __FILE__ <<
endl" I see the file name, so I'm not sure why this is happening.
Thanks,
Tomer
Re: File name and line numbers not working
Posted by Dale King <da...@gmail.com>.
He said in his message that he was using that BasicConfigurator which uses
TTCCLayout. TTCCLayout has a method for turning on file printing, which is
off by default. BUT looking at the code nothing actually looks at that
option so it appears TTCCLayout does not support file and line printing.
On Tue, Jun 30, 2009 at 12:54 PM, Jacob L. Anawalt <
janawalt@geckosoftware.com> wrote:
> On 2009-06-30 01:18, tshiran@yahoo.com wrote:
>
>> 0 [0x7fba18564770] INFO main null - Entering application.
>>
>>
> What is your PatternLayout conversion pattern for logger main?
>
>
> --
> Jacob Anawalt
> Gecko Software, Inc.
> janawalt@geckosoftware.com
> 435-752-8026
>
--
Dale King
Re: File name and line numbers not working
Posted by "Jacob L. Anawalt" <ja...@geckosoftware.com>.
On 2009-06-30 01:18, tshiran@yahoo.com wrote:
> 0 [0x7fba18564770] INFO main null - Entering application.
>
What is your PatternLayout conversion pattern for logger main?
--
Jacob Anawalt
Gecko Software, Inc.
janawalt@geckosoftware.com
435-752-8026