You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Allistair Crossley <Al...@QAS.com> on 2004/06/29 15:17:30 UTC

Why does %L output as a question mark?

I've searched Google without success on this issue. I am getting question marks where the line number should be in my log files. My setup is as follows;

log4j.logger.com.cmp.newmedia.intranet.iq.logic.schedules=debug, SchedulesA
log4j.appender.SchedulesA=org.apache.log4j.DailyRollingFileAppender
log4j.appender.SchedulesA.File=d:/iq/logs/schedules.log
log4j.appender.SchedulesA.layout=org.apache.log4j.PatternLayout
log4j.appender.SchedulesA.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
log4j.appender.SchedulesA.DatePattern=.yyyy-MM-dd

In my ScheduleLogic class in package com.cmp.newmedia.intranet.iq.logic.schedules I get the logger as follows;

static Logger logger = Logger.getLogger(ScheduleLogic.class);

and call it;

logger.debug("list");

My statements come out as follows;

14:09:40,392 DEBUG ScheduleLogic:? - list

This seems to be a widespread problem in all my logs but I run other software like Hibernate which manages to get line numbers into my logs using the same pattern!

Your help appreciated, ADC.


<FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE> 
-------------------------------------------------------
QAS Ltd.
Developers of QuickAddress Software
<a href="http://www.qas.com">www.qas.com</a>
Registered in England: No 2582055
Registered in Australia: No 082 851 474
-------------------------------------------------------
</FONT>


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Why does %L output as a question mark?

Posted by Ionel GARDAIS <ig...@yahoo.fr>.
Hi,

Did you compile with optimization on ?

optimization removes lines numbers unless debug is on
and debuglevel is set to lines,vars,source.

actually, I don't know if there is still optimization
if you force debug and debuglevel ...

ionel

--- Allistair Crossley <Al...@QAS.com> a
écrit : > I've searched Google without success on this
issue.
> I am getting question marks where the line number
> should be in my log files. My setup is as follows;
> 
>
log4j.logger.com.cmp.newmedia.intranet.iq.logic.schedules=debug,
> SchedulesA
>
log4j.appender.SchedulesA=org.apache.log4j.DailyRollingFileAppender
>
log4j.appender.SchedulesA.File=d:/iq/logs/schedules.log
>
log4j.appender.SchedulesA.layout=org.apache.log4j.PatternLayout
>
log4j.appender.SchedulesA.layout.ConversionPattern=%d{ABSOLUTE}
> %5p %c{1}:%L - %m%n
> log4j.appender.SchedulesA.DatePattern=.yyyy-MM-dd
> 
> In my ScheduleLogic class in package
> com.cmp.newmedia.intranet.iq.logic.schedules I get
> the logger as follows;
> 
> static Logger logger =
> Logger.getLogger(ScheduleLogic.class);
> 
> and call it;
> 
> logger.debug("list");
> 
> My statements come out as follows;
> 
> 14:09:40,392 DEBUG ScheduleLogic:? - list
> 
> This seems to be a widespread problem in all my logs
> but I run other software like Hibernate which
> manages to get line numbers into my logs using the
> same pattern!
> 
> Your help appreciated, ADC.
> 
> 
> <FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE> 
>
-------------------------------------------------------
> QAS Ltd.
> Developers of QuickAddress Software
> <a href="http://www.qas.com">www.qas.com</a>
> Registered in England: No 2582055
> Registered in Australia: No 082 851 474
>
-------------------------------------------------------
> </FONT>
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail:
> log4j-user-help@logging.apache.org
> 
>  


	

	
		
Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/

Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !Téléchargez Yahoo! Messenger sur http://fr.messenger.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org