public static void InitRhoLog() { RhoConf.InitRhoConf(); //Set defaults m_oLogConf.setLogPrefix(true); m_oLogConf.setLogToFile(true); //TODO - if ip is empy in rhoconfig then we have to set to false if (isSimulator()) { m_oLogConf.setMinSeverity(L_INFO); m_oLogConf.setLogToOutput(true); m_oLogConf.setEnabledCategories("*"); m_oLogConf.setDisabledCategories(""); m_oLogConf.setMaxLogFileSize(0); //No limit } else { m_oLogConf.setMinSeverity(L_ERROR); m_oLogConf.setLogToOutput(false); m_oLogConf.setEnabledCategories(""); m_oLogConf.setMaxLogFileSize(1024 * 50); } if (RhoConf.getInstance().getRhoRootPath().length() > 0) { m_oLogConf.setLogFilePath(RhoConf.getInstance().getRhoRootPath() + LOGFILENAME); } //load configuration if exist // //m_oLogConf.saveToFile(""); // RhoConf.getInstance().loadConf(); m_oLogConf.loadFromConf(RhoConf.getInstance()); if (RhoConf.getInstance().getString("rhologhost").length() > 0) { m_oLogConf.setServerSynk(new rho.logging.RhoLogServerSink(m_oLogConf)); } }
public static void InitRhoLog() { RhoConf.InitRhoConf(); //Set defaults m_oLogConf.setLogPrefix(true); m_oLogConf.setLogToFile(true); if (isSimulator()) { m_oLogConf.setMinSeverity(L_INFO); m_oLogConf.setLogToOutput(true); m_oLogConf.setEnabledCategories("*"); m_oLogConf.setDisabledCategories(""); m_oLogConf.setMaxLogFileSize(0); //No limit } else { m_oLogConf.setMinSeverity(L_ERROR); m_oLogConf.setLogToOutput(false); m_oLogConf.setEnabledCategories(""); m_oLogConf.setMaxLogFileSize(1024 * 50); } if (RhoConf.getInstance().getRhoRootPath().length() > 0) { m_oLogConf.setLogFilePath(RhoConf.getInstance().getRhoRootPath() + LOGFILENAME); } //load configuration if exist // //m_oLogConf.saveToFile(""); // RhoConf.getInstance().loadConf(); m_oLogConf.loadFromConf(RhoConf.getInstance()); }