From: <ju...@us...> - 2008-08-29 18:13:27
|
Revision: 7005 http://smartfrog.svn.sourceforge.net/smartfrog/?rev=7005&view=rev Author: julgui Date: 2008-08-29 18:13:23 +0000 (Fri, 29 Aug 2008) Log Message: ----------- Added simple diag for Loggers Modified Paths: -------------- trunk/core/smartfrog/src/org/smartfrog/sfcore/common/Diagnostics.java trunk/core/smartfrog/src/org/smartfrog/sfcore/logging/LogFactory.java Modified: trunk/core/smartfrog/src/org/smartfrog/sfcore/common/Diagnostics.java =================================================================== --- trunk/core/smartfrog/src/org/smartfrog/sfcore/common/Diagnostics.java 2008-08-29 18:13:15 UTC (rev 7004) +++ trunk/core/smartfrog/src/org/smartfrog/sfcore/common/Diagnostics.java 2008-08-29 18:13:23 UTC (rev 7005) @@ -49,6 +49,7 @@ import org.smartfrog.sfcore.processcompound.SFProcess; import org.smartfrog.sfcore.security.SFClassLoader; import org.smartfrog.sfcore.security.SFSecurity; +import org.smartfrog.sfcore.logging.LogFactory; import java.io.File; import java.io.FileOutputStream; @@ -187,6 +188,8 @@ header(out, "Locale information"); doReportLocale(out); + + doReportLoggers (out); } @@ -868,4 +871,15 @@ } + /** + * Report list of Logger registered in LogFactory + * @param out StringBuffer + */ + public static void doReportLoggers(StringBuffer out) { + header(out, "Loggers registered in process compound"); + LogFactory.doReportLoggers(out); + out.append(out); + out.append("\n"); + } + } Modified: trunk/core/smartfrog/src/org/smartfrog/sfcore/logging/LogFactory.java =================================================================== --- trunk/core/smartfrog/src/org/smartfrog/sfcore/logging/LogFactory.java 2008-08-29 18:13:15 UTC (rev 7004) +++ trunk/core/smartfrog/src/org/smartfrog/sfcore/logging/LogFactory.java 2008-08-29 18:13:23 UTC (rev 7005) @@ -11,6 +11,7 @@ import java.rmi.RemoteException; import java.util.Hashtable; +import java.util.Enumeration; /** * Log Factory @@ -293,5 +294,21 @@ return getOwnerLog(owner, owner); } + /** + * Report list of Logger registered in LogFactory + * @param out StringBuffer + */ + public static void doReportLoggers(StringBuffer out) { + for (Enumeration e = loggers.keys(); e.hasMoreElements(); ) { + out.append ((String) e.nextElement()); + out.append ("\n"); + } + } + public String toString () { + StringBuffer out = new StringBuffer(); + doReportLoggers(out); + return out.toString(); + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |