From: <dr...@us...> - 2003-04-03 18:11:27
|
Update of /cvsroot/webmacro/webmacro/src/org/webmacro/util In directory sc8-pr-cvs1:/tmp/cvs-serv2961/org/webmacro/util Modified Files: LogSystem.java Log Message: Fixing bugs where log messages can be output multiple times. Index: LogSystem.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/src/org/webmacro/util/LogSystem.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** LogSystem.java 11 Jun 2002 17:43:23 -0000 1.4 --- LogSystem.java 3 Apr 2003 18:11:23 -0000 1.5 *************** *** 125,128 **** --- 125,146 ---- } + /** + * Remove the specified LogSystem instance from the internal + * cache of LogSystems. + */ + public static void removeInstance(LogSystem instance) { + synchronized (_instances) { + if (_instances.containsValue(instance)) { + for (Iterator itr = _instances.entrySet().iterator(); itr.hasNext();) { + Map.Entry e = (Map.Entry) itr.next(); + if (e.getValue() == instance) { + itr.remove(); + } + } + } + } + } + + ///////////////////////////////////////////// |