Julien,
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
Bill
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);
hierarchy.setDefaultLogTarget(target);
hierarchy.setDefaultPriority(org.apache.log.Priority.WARN);
// 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:[EMAIL PROTECTED]Sent: Friday, 6 December 2002 7:30
PMTo: [EMAIL PROTECTED]Subject: Re: Problem with
Fop and Log4jthanks.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:
MessageHandler.setScreenLogger(cat);
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 =
Category.getInstance(PrintDevis.class.getName());
driver.setLogger(new org.apache.avalon.framework.logger.Log4JLogger(cat));
Jeremias Maerki
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
---
REDONDO Julien
Ingénieur Développement Logiciel
AAcom
120 avenue du Marin Blanc
13680 Aubagne
Tel: 0442726569
Fax: 0442726568