My bet is that it's a classpath problem.  The logging system at home has
access to the class information whereas the logging system at work
doesn't.  

I'm not even sure how this could be possible, but I still bet that's the
problem.

alan

-----Original Message-----
From: Allistair Crossley [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 12, 2004 1:17 AM
To: [EMAIL PROTECTED]
Subject: Unknown Source problem (config and example included)

Hi All,

Our development effort has been a little hindered by Log4J's output not
revealing line numbers for errors. I am sure there is a perfectly good
reason for this although I have found a caveat.

A sample from our log4j.properties file is as follows to define a logger
called Application. This is because we want our classes to use named
loggers like Search, Content, Application and others rather than
specifying the full class. We do this as follows;

log4j.logger.Application=debug, ApplicationA
log4j.appender.ApplicationA=org.apache.log4j.DailyRollingFileAppender
log4j.appender.ApplicationA.File=../logs/application.log
log4j.appender.ApplicationA.layout=org.apache.log4j.PatternLayout
log4j.appender.ApplicationA.layout.ConversionPattern=%d %-5p %l : %m%n

When our application logs to this particular log by

static Logger logger = Logger.getLogger("Application");

the following output is given;

2004-05-11 10:23:22,393 DEBUG
com.qas.newmedia.intranet.iq.logic.core.stellent.StellentContentManageme
ntSystemDAO.getWorkflows(Unknown Source) : wfProps={dRevLabel=1,
dWfStepType=:R:C:CE:, dDocTitle=testy, dDocAccount=, dCheckoutUser=,
dIsCheckedOut=, dDocType=Announcement, wfQueueEnterTs={ts '2004-05-11
10:23:17.614'}, dID=8524, dWfName=WF_Public,
dWfStepName=iQTestPublishAuthorisation, wfQueueActionState=,
dSecurityGroup=Public, dDocName=intratest_007129, dDocAuthor=daniele,
dClbraName=, wfQueueLastActionTs={ts '2004-05-11 10:23:17.614'}}

The part I want to draw your attention to is the end of the method
signature (Unknown Source) which is usually a line number. ALL our
loggers log without the line number bere.

The interesting caveat is that I took the web application home a few
weeks ago and installed it "as is". The logging statements *did* have a
line number on my home machine.

I wonder if anyone knows what I could do about this?

Cheers, 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to