From: Patrick G. <sf...@us...> - 2004-05-27 13:53:28
|
Update of /cvsroot/smartfrog/core/smartfrog/src/org/smartfrog/services/trace In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2717 Modified Files: SFTrace.java Log Message: mods to use new logging APIs Index: SFTrace.java =================================================================== RCS file: /cvsroot/smartfrog/core/smartfrog/src/org/smartfrog/services/trace/SFTrace.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SFTrace.java 20 May 2004 13:43:09 -0000 1.4 --- SFTrace.java 27 May 2004 13:53:15 -0000 1.5 *************** *** 30,33 **** --- 30,34 ---- import org.smartfrog.sfcore.common.SmartFrogResolutionException; import org.smartfrog.sfcore.common.SmartFrogCoreKeys; + import org.smartfrog.sfcore.logging.LogSF; import org.smartfrog.sfcore.prim.Prim; import org.smartfrog.sfcore.prim.PrimHook; *************** *** 54,57 **** --- 55,60 ---- boolean verbose = true; + /** the log component to which to generate the trace logs */ + LogSF log = null; //SmartFrog Attributes: *************** *** 95,98 **** --- 98,103 ---- super.sfDeploy(); + log = sfGetProcessLog(); + try { try { *************** *** 100,105 **** } catch (Exception ex) { //TODO ! System.err.println("sfTrace: Exception deployment:" + ! ex.toString()); } --- 105,111 ---- } catch (Exception ex) { //TODO ! if (log.isErrorEnabled()) ! log.error("sfTrace: Exception deployment:" + ! ex.toString()); } *************** *** 110,115 **** } catch (Exception ex) { //TODO ! System.err.println("sfTrace: Exception deployment:" + ! ex.toString()); } --- 116,122 ---- } catch (Exception ex) { //TODO ! if (log.isErrorEnabled()) ! log.error("sfTrace: Exception deployment:" + ! ex.toString()); } *************** *** 118,123 **** } catch (Exception ex) { //TODO ! System.err.println("sfTrace: Exception deployment:" + ! ex.toString()); } --- 125,131 ---- } catch (Exception ex) { //TODO ! if (log.isErrorEnabled()) ! log.error("sfTrace: Exception deployment:" + ! ex.toString()); } *************** *** 172,177 **** // TODO: Check } catch (Exception ex) { ! System.err.println("sfTrace: Exception(getUniqueID :" + ! ex.toString()); id = "defaultUniqueID"; } --- 180,186 ---- // TODO: Check } catch (Exception ex) { ! if (log.isErrorEnabled()) ! log.error("sfTrace: Exception(getUniqueID :" + ! ex.toString()); id = "defaultUniqueID"; } *************** *** 187,191 **** */ public synchronized void sfStart() throws SmartFrogException, ! RemoteException { super.sfStart(); } --- 196,200 ---- */ public synchronized void sfStart() throws SmartFrogException, ! RemoteException { super.sfStart(); } *************** *** 291,305 **** if (printMsgImp == null) { ! System.out.println("sfTrace: " + msg); } else { try { printMsgImp.printMsg(msg + "\n"); } catch (Exception ex) { ! System.out.println("sfTrace: " + ex); ! ex.printStackTrace(); } } } catch (Throwable th) { ! System.err.println("SFTrace.printMsg " + th.toString()); } } --- 300,316 ---- if (printMsgImp == null) { ! log.info("sfTrace: " + msg); } else { try { printMsgImp.printMsg(msg + "\n"); } catch (Exception ex) { ! if (log.isErrorEnabled()) ! log.error("sfTrace: " + ex); ! //ex.printStackTrace(); } } } catch (Throwable th) { ! if (log.isErrorEnabled()) ! log.error("SFTrace.printMsg " + th.toString()); } } |