Keiron Liddle wrote: > > On Thu, 02 Aug 2001 17:45:56 Carlos Villegas wrote: > > I think it's possible to do in FOP what was done in Velocity. They have > > a middleware that decouples Velocity from the specific logging toolkit. > > So they have drivers for logkit and log4j and you can even write your > > own one. This is a better choice when embedding FOP since you'd want to > > use whatever logging system you've already have in place. I think it's > > worth taking a look at the Velocity log package, we might be able to > > reuse it. > > That would work, but I have a few problems with it. > - We would need to copy their code (and hence create two diverging > versions) because it has dependancies > - It adds an extra 3 layers to every log call, also has extra logic > - a logging system should do all of the targetting things itself (instead > of having an interface with multiple targets to an interface with multiple > targets that writes the logging) > - I want to avoid having extra code that only adds complexity
Well, it was just an idea. I don't think it's that much extra code anyway, or that extra code necessarily adds complexity. My post was motivated from my experience with Velocity. We're using Velocity in a servlet environment. Our system already had its own logging system. Velocity as shipped, logs to its own file, but we wanted to use our same configuration file to configure Velocity logging as well and to merge logs onto a single destination. It was very easy, all you you to do is implement a very simple interface, basically: interface VelocityLog { void debug(String message); void info(String message); void error(String message); ... } and set a property in Velocity to point to your logging implementation class. Yes, it adds an extra layer and notice that some nice features of systems like log4j are not used, like categories. It all depends of course on your needs. Velocity is intended primarily to be embedded, so you'd want that flexibility. Nevertheless, I don't neccessarily think it's the best choice for FOP. This is also related to a recent post about FOP APIs, there were some complains about how inflexible FOP is when trying to embed it. Carlos --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]