xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Lunnon" <b...@mirrim.com.au>
Subject RE: Problem with Fop and Log4j
Date Fri, 06 Dec 2002 10:49:38 GMT
The only logger I could get to work with FOP (0.20.3) was the one in the
Avalon framework.

Have snapshot of code below, hope this helps


 final String logMessageFormat =
   "[%{priority}]: %{category} %{message}\n%{throwable}";
 try {
     // get the default hierarchy (org.apache.log.)
     Hierarchy hierarchy = Hierarchy.getDefaultHierarchy();
     PatternFormatter formatter =
  new PatternFormatter(logMessageFormat);
     LogTarget target = new FileTarget(logFileName,true,formatter);
     // create the logger
     reportLogger = hierarchy.getLoggerFor(className);
     // log a message
     reportLogger.warn("FOP Logger started");
 catch (IOException e) {
     // what can you do when the logger setup fails, can't log
     // the error back
  -----Original Message-----
  From: REDONDO Julien [mailto:jredondo@aacom.fr]
  Sent: Friday, 6 December 2002 7:30 PM
  To: fop-user@xml.apache.org
  Subject: Re: Problem with Fop and Log4j


  i verified and i have the error message of FOP in the logs. But nothing
message in debug mode ???
  I did a cat.debug and it's ok...

  Jeremias Maerki wrote:

Looks ok to me. You don't get any error messages, do you? Have you
checked that your category is configured properly, i.e. you get output
when you manually log something using your "cat" variable just before
setting the logger?

Maybe you also have to set the logger for MessageHandler:


as shown in http://xml.apache.org/fop/embedding.html.

On 05.12.2002 10:57:43 REDONDO Julien wrote:

i use log4j with fop and i have a problem :
Fop doesn't do logs in my file..

why ??

my line command is  :

private static Category cat =
driver.setLogger(new org.apache.avalon.framework.logger.Log4JLogger(cat));

Jeremias Maerki

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

Ingénieur Développement Logiciel
120 avenue du Marin Blanc
13680 Aubagne
Tel: 0442726569
Fax: 0442726568

View raw message