On 05/18/2010 08:50 AM, Giovanni Mascellani wrote:
> reassing 579206 libjpf-java
> thanks
> 
> Hi all.
> 
> Hi Gregor and Tony, I'm reassigning a bug to libjpf-java. The bug is
> rather minor and the log is really short. Please, let me know if you
> don't agree about the reassignment! :-)
> 
> Il 27/04/2010 10:37, Giovanni Mascellani ha scritto:
>> Il 26/04/2010 10:58, v.nix.is ha scritto:
>>> After upgrading osmosis I get output like this from cron jobs using it:
>>>     
>>>     log4j:WARN No appenders could be found for logger 
>>> (org.java.plugin.ObjectFactory).
>>>     log4j:WARN Please initialize the log4j system properly.
>>>     log4j:WARN No appenders could be found for logger 
>>> (org.java.plugin.ObjectFactory).
>>>     log4j:WARN Please initialize the log4j system properly.
>>>     log4j:WARN No appenders could be found for logger 
>>> (org.java.plugin.ObjectFactory).
>>>     log4j:WARN Please initialize the log4j system properly.
>>>     log4j:WARN No appenders could be found for logger 
>>> (org.java.plugin.ObjectFactory).
>>>     log4j:WARN Please initialize the log4j system properly.
>>>
>>> Steps to reproduce:
>>
>> Thanks for the nice report. I could reproduce the bug.
>>
>> I'm not very into log4j, but I'll have a look at it and try to solve the
>> bug.
> 
> I think I traced this bug, back to libjpf-java. The short program
> attached should demonstrate it.
> 
> The related line in osmosis is
> src/org/openstreetmap/osmosis/core/TaskRegistrar.java, line 422
> (referring to the version currently in unstable).
> 
> Thanks, Giovanni.

Hi Giovanni,

I'm not sure what your minimal test case is meant to exhibit.  The warnings
you're seeing from log4j are normal warnings you see when there isn't a
log4j.properties file.  That is, log4j is simply letting us know that a
component attempted to use it but that there were no appenders configured.  If
you add have a valid log4j.properties file available on the classpath (sample
attached), you'll see what JPF is attempting to log.

As for why this warning would appear after an upgrade to osmosis, my initial
guess would be that previous versions had a valid log4j configuration available,
and that this is no longer the case.  Or, it could be that the jpf.properties
file is missing or as moved (and so JPF can't find its configuration).  I'll
experiment with osmosis this week as time allows.

Cheers,
tony
#### Use two appenders, one to log to console, another to log to a file
log4j.rootCategory=TRACE, stdout 

#### First appender writes to console
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p [%d{HH:mm:ss}] [%t] 
(%c::%M:%L) - %m%n

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to