You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Simon Pepping <sp...@leverkruid.nl> on 2005/06/23 22:44:46 UTC

Re: Logging with 1.0dev

Will,

I am answering you on fop-user.

See xml-fop/src/private-resources for an example of how to configure
logging with SimpleLog (org.apache.commons.logging.impl.SimpleLog). If
you want to selectively change the log level for some loggers, you
will have to dig in the code for the logger names. Often they are the
package or class name.

Regards, Simon

On Thu, Jun 23, 2005 at 08:16:34PM +0200, Jeremias Maerki wrote:
> Will,
> 
> we haven't had any chance, yet, to write more than design documentation
> on 1.0dev. 1.0dev uses Jakarta Commons Logging [1] as logging framework.
> This means that on a standard JDK 1.4 (or higher) system JCL uses JDK
> logging as its backend by default. For this case you'd have to look up
> the documentation for JDK logging [2]. It's pretty easy to supply your
> own logger of choice. The JCL documentation will tell you how to do that.
> 
> In contrast to Avalon loggon JCL logging uses more or less the same
> approach as Log4J which normally fetches the logger per class into a
> static variable. That's why you can't set a logger directly on the
> Driver (or rather Fop now) instance.
> 
> I believe that until the final 1.0 release it is possible that in the
> area of logging of few things may still change. Probably not the use of
> JCL but maybe a specialized facility to observe the formatting process
> programmatically. There's nothing written in stone about that, yet. And
> until then, consider 1.0dev a moving target. Suggestions and help are
> welcome.
> 
> HTH
> 
> [1] http://jakarta.apache.org/commons/logging/ (version 1.0.3)
> [2] http://java.sun.com/j2se/1.4.2/docs/guide/util/logging/index.html
> 
> On 23.06.2005 18:18:19 Will Peterson wrote:
> > Is there any sample documentation on how to do logging with Fop 1.0dev.
> > 
> > The previous Fop had examples right in the distribution, but I can't
> > find anything there, or on the web for sample code of how to do logging.
> > (All the code example I see are based on having a  handle on the driver
> > (for example):
> > 
> >         //Setup logger
> >         Logger logger = new ConsoleLogger(ConsoleLogger.LEVEL_INFO);
> >         driver.setLogger(logger);
> >         MessageHandler.setScreenLogger(logger);
> > 
> > Thanks for any help,
> > 
> > - Will
> 
> 
> 
> Jeremias Maerki
> 

-- 
Simon Pepping
home page: http://www.leverkruid.nl


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