xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Bowditch <bowditch_ch...@hotmail.com>
Subject Re: Detecting errors in rendering
Date Mon, 05 Jul 2004 08:50:10 GMT
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:


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.


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

View raw message