xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Siepert <andreas.siep...@bader-jene.de>
Subject Re: Missing log4j appender
Date Sun, 13 Jan 2008 15:55:29 GMT
Hi Samuel,

this is the typical output for not having configured log4j.
To configure it you can for example place a log4j.properties file into 
your classpath (something like ../classes/log4j.properties) but there 
are some options.
A sample content for such a properties file is:

<code>
log4j.rootLogger=DEBUG, CONSOLE

log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout

log4j.appender.CONSOLE.layout.ConversionPattern=%-4r %-5p [%t] %37c %3x 
- %m%n

log4j.appender.FILE=org.apache.log4j.RollingFileAppender
log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
log4j.appender.FILE.layout.ConversionPattern=%-4r %-5p [%t] %37c %3x - %m%n
log4j.appender.FILE.file=logs/app.log
</code>

This will log every DEBUG output (or higher level output like WARN, 
ERROR, FATAL) to the app.log file in the log directory.

For more details see the log4j page http://logging.apache.org/log4j/

Probably, configuring log4j will reveal some real issues using fop...

Greetings
Andi

Samuel Penn schrieb:
> I have just upgraded to fop 0.93 from 0.20.5, on Gentoo Linux, and
> I'm now running into some issues whenever I try to process files
> which worked prior to the upgrade.
>
> Running fop, I get the following error:
>
> log4j:WARN No appenders could be found for logger
> (org.apache.fop.render.RendererFactory).
> log4j:WARN Please initialize the log4j system properly.
>
> An empty output file is generated, then deleted. This error is thrown
> even if I just run fop by itself (I get that error, followed by a usage).
>
> I can see three possible causes:
>
>   1) It's a Gentoo issue, and not a FOP issue.
>
>   2) It's not a log4j issue (it is reported as a warning after all),
>      and something has changed which is causing some other failure
>      which can't be logged. Setting up log4j will tell me what the
>      real problem is.
>
>   3) log4j needs to be setup somehow, which will fix the problem.
>
> Assuming 2 or 3, how do I setup a suitable log4j configuration file
> and pass it to fop when running it from the command line?
>
> Thanks,
>
> Sam.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message