Пример #1
0
        public static void InitRhoConf()
        {
            m_Instance = new RhoConf();

            String szRootPath = "";

            try{
                CRhoFile.recursiveCreateDir(CRhodesApp.getRhoRootPath());
                szRootPath = CRhodesApp.getRhoRootPath();
            }catch (Exception) {}


            m_Instance.setConfFilePath(szRootPath + CONF_FILENAME);
            m_Instance.setRhoRootPath(szRootPath);
        }
Пример #2
0
 public void loadFromConf(RhoConf oRhoConf)
 {
     if ( oRhoConf.isExist( "MinSeverity" ) )
         setMinSeverity( oRhoConf.getInt("MinSeverity") );
     if ( oRhoConf.isExist( "LogToOutput") )
         setLogToOutput( oRhoConf.getBool("LogToOutput") );
     if ( oRhoConf.isExist( "LogToFile") )
         setLogToFile( oRhoConf.getBool("LogToFile"));
     if ( oRhoConf.isExist( "LogFilePath") )
         setLogFilePath( oRhoConf.getString("LogFilePath") );
     if ( oRhoConf.isExist( "MaxLogFileSize") )
         setMaxLogFileSize( oRhoConf.getInt("MaxLogFileSize") );
     if ( oRhoConf.isExist( "LogCategories") )
         setEnabledCategories( oRhoConf.getString("LogCategories") );
     if (oRhoConf.isExist( "ExcludeLogCategories") )
         setDisabledCategories( oRhoConf.getString("ExcludeLogCategories") );
 }
Пример #3
0
        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));
            }
        }
Пример #4
0
        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());
        }
Пример #5
0
 RhoConf RHOCONF()
 {
     return(RhoConf.getInstance());
 }
Пример #6
0
    public static void InitRhoConf(){
        m_Instance = new RhoConf();
    	
    	String szRootPath = "";
    	try{
            CRhoFile.recursiveCreateDir(CRhodesApp.getRhoRootPath());
    		szRootPath = CRhodesApp.getRhoRootPath();
    	}catch(Exception ){}

    	
    	m_Instance.setConfFilePath(szRootPath + CONF_FILENAME);
    	m_Instance.setRhoRootPath(szRootPath);
    }