From: Eric B. R. <eb...@tc...> - 2003-04-03 17:15:42
|
On Thursday, April 3, 2003, at 11:50 AM, kea...@na...=20= wrote: > I haven't made JUnit test case yet, but here's the simplest example I=20= > can cook up: <snip> > You can see from the output below that "Test message 1" gets logged=20 > once, "Test message 2" get logged twice, etc. I think the problem is that when a Broker is destroyed, it's not=20 clearing out the log targets it registered. I think the solution here is to add a static=20 ".removeInstace(LogSystem)" to LogSystem.java, and have=20 Broker.stopClient() call LogSystem.removeInstance() when the Broker is=20= really dead. I've just done this, but haven't committed it yet. eric > > Keats > > 11:44:12 AM=A0=A0=A0=A0 LogFile NOTICE=A0 --- Log Started --- > 11:44:12 AM=A0=A0=A0=A0 broker=A0 NOTICE=A0 starting = org.webmacro.Broker:=20 > wm.properties > 11:44:12 AM=A0=A0=A0=A0 broker=A0 NOTICE=A0 Loaded settings from=20 > WebMacro.defaults, wm.properties, (System Properties) > 11:44:12 AM=A0=A0=A0=A0 wm=A0=A0=A0=A0=A0 NOTICE=A0 new = WebMacro(wm.properties) v@VERSION@ > 11:44:12 AM=A0=A0=A0=A0 wm=A0=A0=A0=A0=A0 NOTICE=A0 Test message 1 > 11:44:12 AM=A0=A0=A0=A0 broker=A0 NOTICE=A0 shutting down > 11:44:12 AM=A0=A0=A0=A0 LogFile NOTICE=A0 --- Log Started --- > 11:44:12 AM=A0=A0=A0=A0 broker=A0 NOTICE=A0 starting = org.webmacro.Broker:=20 > wm.properties > 11:44:12 AM=A0=A0=A0=A0 broker=A0 NOTICE=A0 starting = org.webmacro.Broker:=20 > wm.properties > 11:44:12 AM=A0=A0=A0=A0 broker=A0 NOTICE=A0 Loaded settings from=20 > WebMacro.defaults, wm.properties, (System Properties) > 11:44:12 AM=A0=A0=A0=A0 broker=A0 NOTICE=A0 Loaded settings from=20 > WebMacro.defaults, wm.properties, (System Properties) > 11:44:12 AM=A0=A0=A0=A0 wm=A0=A0=A0=A0=A0 NOTICE=A0 new = WebMacro(wm.properties) v@VERSION@ > 11:44:12 AM=A0=A0=A0=A0 wm=A0=A0=A0=A0=A0 NOTICE=A0 new = WebMacro(wm.properties) v@VERSION@ > 11:44:12 AM=A0=A0=A0=A0 wm=A0=A0=A0=A0=A0 NOTICE=A0 Test message 2 > 11:44:12 AM=A0=A0=A0=A0 wm=A0=A0=A0=A0=A0 NOTICE=A0 Test message 2 > 11:44:12 AM=A0=A0=A0=A0 broker=A0 NOTICE=A0 shutting down > 11:44:12 AM=A0=A0=A0=A0 broker=A0 NOTICE=A0 shutting down > 11:44:12 AM=A0=A0=A0=A0 LogFile NOTICE=A0 --- Log Started --- > 11:44:12 AM=A0=A0=A0=A0 broker=A0 NOTICE=A0 starting = org.webmacro.Broker:=20 > wm.properties > 11:44:12 AM=A0=A0=A0=A0 broker=A0 NOTICE=A0 starting = org.webmacro.Broker:=20 > wm.properties > 11:44:12 AM=A0=A0=A0=A0 broker=A0 NOTICE=A0 starting = org.webmacro.Broker:=20 > wm.properties > 11:44:12 AM=A0=A0=A0=A0 broker=A0 NOTICE=A0 Loaded settings from=20 > WebMacro.defaults, wm.properties, (System Properties) > 11:44:12 AM=A0=A0=A0=A0 broker=A0 NOTICE=A0 Loaded settings from=20 > WebMacro.defaults, wm.properties, (System Properties) > 11:44:12 AM=A0=A0=A0=A0 broker=A0 NOTICE=A0 Loaded settings from=20 > WebMacro.defaults, wm.properties, (System Properties) > 11:44:12 AM=A0=A0=A0=A0 wm=A0=A0=A0=A0=A0 NOTICE=A0 new = WebMacro(wm.properties) v@VERSION@ > 11:44:12 AM=A0=A0=A0=A0 wm=A0=A0=A0=A0=A0 NOTICE=A0 new = WebMacro(wm.properties) v@VERSION@ > 11:44:12 AM=A0=A0=A0=A0 wm=A0=A0=A0=A0=A0 NOTICE=A0 new = WebMacro(wm.properties) v@VERSION@ > 11:44:12 AM=A0=A0=A0=A0 wm=A0=A0=A0=A0=A0 NOTICE=A0 Test message 3 > 11:44:12 AM=A0=A0=A0=A0 wm=A0=A0=A0=A0=A0 NOTICE=A0 Test message 3 > 11:44:12 AM=A0=A0=A0=A0 wm=A0=A0=A0=A0=A0 NOTICE=A0 Test message 3 > 11:44:12 AM=A0=A0=A0=A0 broker=A0 NOTICE=A0 shutting down > 11:44:12 AM=A0=A0=A0=A0 broker=A0 NOTICE=A0 shutting down > 11:44:12 AM=A0=A0=A0=A0 broker=A0 NOTICE=A0 shutting down > |