On 8/24/05, Costin Manolache <[EMAIL PROTECTED]> wrote: > Nathan Bubna wrote: > > On 8/23/05, Remy Maucherat <[EMAIL PROTECTED]> wrote: > > > >>Nathan Bubna wrote: > >> > >>>hey folks, > >>> > >>>i'm a developer on the VelocityTools subproject, and we recently came > >>>across an issue with the use of commons-logging in Tomcat 5.5.9. > >>> > >>>by default, we configure our example applications to use an adapter > >>>between commons-logging and Velocity's LogSystem. this way, those of > >>>our tools which require logging are able to send messages to > >>>commons-logging and they get passed of to the LogSystem that the rest > >>>of Velocity is using (without having to pass that LogSystem around). > >>>We also, by default, configure our VelocityViewServlet (the core class > >>>of VelocityTools) to automatically send LogSystem messages to the > >>>servlet log. > >>> > >>>so, messages sent to c-l are sent the the Velocity LogSystem which > >>>sends the messages to the servlet log. > >>> > >>>this works just dandy for everyone in Tomcat 5.0.x, but when we deploy > >>>our very minimal example applications in Tomcat 5.5.9, we promptly > >>>receive stack overflows and out of memory errors that appear to be a > >>>nasty little commons-logging loop. > >>> > >>>can somebody help me figure out what change between 5.0 and 5.5 is > >>>causing this? and further, what can be done about it? i'm still not > >>>even sure whether to consider this a bug in our design or in Tomcat. > >>> > >>>any help would be much appreciated! > >> > >>In Tomcat 5.5, everything is logged to commons-logging, so the loop you > >>get is to be expected. > > > > > > so, i guess that means web applications/frameworks that wish to work > > with Tomcat 5.5 must either not redirect commons-logging messages to > > their own logging solution or else they must not use > > servletContext.log(...) as a target for their logging solution, > > correct? > > > > Seems so - since servletContext.log() call commons-logging, not a good > idea to use an impl. of commons-logging that eventually calls > servletContext.log(). > Maybe a better solution would be to have the Velocity LogSystem send > messages to commons-logging, then everything will go to c-l and the > chosen impl.
yeah, that's the direction i'm headed. it's a little unfortunate, as it forces our users to deal with commons-logging and gives up a level of control, but i don't see any better solution at present. i suppose i could try and come up with a default target besides the servlet log, but that could be a PITA to make it "just work" on all systems. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]