Hello,

Assuming your log4j configuration file is placed in the
"/home/cozy/doc/xsl/" folder,
you can tell fop to use your log4j file like this:

fop -Dlog4j.configuration=file:///home/cozy/doc.xsl/log4j.xml-c
/home/cozy/doc/xsl/myconf.xml -fo  \
         user_manual.fo -pdf  user_manual.pdf

(replace log4j.xml with the actual name of your configuration file).

HTH,
Julian

2010/5/25 nancy_b <nancy_br...@yahoo.com>:
>
> From http://wiki.apache.org/xmlgraphics-fop/HowTo/SetupLog4JLogging:
>
> "Set the following system property when you start the JVM:
> -Dlog4j.configuration=file:///C:/Dev/FOP/log4j.properties
> ..."
> Does anybody know how do I define this on Linux Debian and where?
>
> Thanks a lot in advance!
> nancy
>
>
> nancy_b wrote:
>>
>> Hi Folks!
>>
>> I use FOP 0.95 to compile PDF documents from DocBook sources on my Linux
>> Debian machine. After upgrading my Debian to v5.2, I get the following
>> log4j-related problem:
>>
>> fop -c /home/cozy/doc/xsl/myconf.xml -fo  \
>>           user_manual.fo -pdf  user_manual.pdf
>> log4j:WARN No appenders could be found for logger
>> (org.apache.fop.util.ContentHandlerFactoryRegistry).
>> log4j:WARN Please initialize the log4j system properly.
>>
>> and FOP does not produce any compilation-related warnings that I expect it
>> to print in the console.
>> 2.6.18.3
>> I did not have this problem before (on my Debian v.2.6.18.3).
>>
>> After reading related posts on this forum, I did the following:
>>
>> 1) Created a log4j conf file (log4j-properties.xml) with the following
>> contents:
>>
>> <?xml version="1.0" encoding="UTF-8" ?>
>> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
>>
>> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/";>
>>   <appender name="console" class="org.apache.log4j.ConsoleAppender">
>>
>>     <layout class="org.apache.log4j.PatternLayout">
>>
>>     </layout>
>>   </appender>
>>   <appender name="logfile" class="org.apache.log4j.FileAppender">
>>     <layout class="org.apache.log4j.PatternLayout">
>>
>>     </layout>
>>   </appender>
>>   <!-- ALL | DEBUG | INFO | WARN | ERROR | FATAL | OFF
>>   <root>
>>     <priority value ="warn" />
>>     <appender-ref ref="console" />
>>     <appender-ref ref="logfile" />
>>   </root>-->
>>   <logger name="org.apache.fop">
>>     <level value="warn"/>
>>     <appender-ref ref="console" />
>>   </logger>
>>   <logger name="org.apache.xmlgraphics">
>>    <level value="warn"/>
>>    <appender-ref ref="console" />
>>   </logger>
>> </log4j:configuration>
>>
>> It sits together with log4j in the /usr/share/java/ directory. I also
>> placed there the log4j.dtd file.
>>
>> 2) In bashrc, I defined the following:
>>
>> export
>> LOG4J_OPTS="-Dlog4j.configuration=/usr/share/java/log4j-properties.xml".
>>
>> But, guess what? It did not help at all. I still get the log4j message.
>> The posts also mention that it is necessary to define the conf. file in
>> the classpath. I have no idea what it is and how to find it....
>>
>> Please, people, help! :-(
>>
>> Thanks a lot in advance!!!!
>> nancy
>>
>>
>>
>
> --
> View this message in context: 
> http://old.nabble.com/Log4j-Woes-tp28658124p28669034.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>

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

Reply via email to