From: Marc P. <ma...@an...> - 2003-04-04 00:52:58
|
On Thu, 3 Apr 2003 19:31:03 -0500, Eric B. Ridge <eb...@tc...> wrote: > Yep. You're right about that. Not sure if this is easily fixed. The > LogTargets are not cached, they're created new for every new Broker > instance. Only thing I can see is to have some kind of LogTargetFactory > that holds onto them (w/ WeakReferences of course) and returns an > existing target if it "looks" the same as the one being created. > > I can work on this if it sounds logical. Hmm this is a nasty problem and that sounds like a filthy hack! Doesn't it stem from some other log architectural problem? Why should calling log.xxxx on a log obtained from a broker from WM instance A also cause the data to be logged to the target introduced by WM instance B? Surely each WM/Broker should have separate logs, each with their separate sets of log targets. There should be no crosstalk. In fact I never get the log from WM instance B (I only use the one from the Servlet's WM instance) so this duplication is doubly crazy if you ask me. This isn't a case of singletons (or rather static stuff) biting us on the ass is it... ? -- Marc Palmer |