platform/wp7/RhoRubyLib/logging/RhoLogConf.cs in rhodes-2.4.1 vs platform/wp7/RhoRubyLib/logging/RhoLogConf.cs in rhodes-3.0.0.beta.1

- old
+ new

@@ -16,22 +16,28 @@ String m_strEnabledCategories = "", m_strDisabledCategories = ""; IRhoLogSink m_pFileSink = null; IRhoLogSink m_pOutputSink = null; + IRhoLogSink m_pServerSink = null; Mutex m_FlushLock = new Mutex(); Mutex m_CatLock = new Mutex(); + public IRhoLogSink getOutputSink() { return m_pOutputSink; } + public RhoLogConf(){ m_pFileSink = new rho.logging.RhoLogFileSink(this); m_pOutputSink = new rho.logging.RhoLogOutputSink(this); } public void close() { if (m_pFileSink != null) m_pFileSink.close(); + + if (m_pServerSink != null) + m_pServerSink.close(); } RhoConf RHOCONF(){ return RhoConf.getInstance(); } public void saveToFile() @@ -91,10 +97,12 @@ } public void setMaxLogFileSize(int nMaxSize) { m_nMaxLogFileSize = nMaxSize; } public int getMaxLogFileSize(){ return m_nMaxLogFileSize; } + public void setServerSynk(IRhoLogSink pServerSynk) { m_pServerSink = pServerSynk; } + public boolean isLogPrefix(){ return m_bLogPrefix;} public void setLogPrefix(boolean bLogPrefix){ m_bLogPrefix = bLogPrefix;} public void setEnabledCategories( String szCatList ) { @@ -134,9 +142,11 @@ m_pFileSink.writeLogMessage(strMsg); //Should be at the end if ( isLogToOutput() ) m_pOutputSink.writeLogMessage(strMsg); + + m_pServerSink.writeLogMessage(strMsg); } public int getLogTextPos(){ return m_pFileSink != null ? m_pFileSink.getCurPos() : -1;