xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Evans" <richard.ev...@retek.com>
Subject RE: Detecting errors in rendering
Date Mon, 05 Jul 2004 09:28:25 GMT
Yes, that does make sense! 

Many thanks for the tip.

Richard

-----Original Message-----
From: Chris Bowditch [mailto:bowditch_chris@hotmail.com] 
Sent: 05 July 2004 09:50
To: fop-user@xml.apache.org
Subject: Re: Detecting errors in rendering

Richard Evans wrote:
> I've tried implementing my own Logger and using Driver.setLogger and 
> this does catch some errors.  However other errors (bad property 
> formats, etc) seem to be reported via the static 'screen logger'.  I 
> don't see how I can use the screen logger safely in a multi-threaded 
> environment.

The screen logger is set by:

MessageHandler.setScreenLogger(logger);

However, as you've noticed, in a MT environment, the messages for different 
threads will be mingled together. The way I solved this problem, was to
create 
a logger that can have many listeners which each register with the logger.
The 
constructor for each listener records the thread name, and when starting a
new 
thread, a new listener is registered with the logger. The logger then passes

its events to registered listeners whose thread name matches the current
thread.

I hope this makes sense.

Chris



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


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


Mime
View raw message