Ejemplo n.º 1
0
void LogSettings::loadFromConf(rho::common::RhoSettings& 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").c_str() );
    if ( oRhoConf.isExist( "MaxLogFileSize") )
        setMaxLogFileSize( oRhoConf.getInt("MaxLogFileSize") );
    if ( oRhoConf.isExist( "LogCategories") )
        setEnabledCategories( oRhoConf.getString("LogCategories").c_str() );
    if (oRhoConf.isExist( "ExcludeLogCategories") )
        setDisabledCategories( oRhoConf.getString("ExcludeLogCategories").c_str() );
	if ( oRhoConf.isExist( "LogToSocket") )
		setLogToSocket( oRhoConf.getBool("LogToSocket") );
	if ( oRhoConf.isExist( "log_exclude_filter") )
        setExcludeFilter( oRhoConf.getString("log_exclude_filter") );
	if ( oRhoConf.isExist( "LogMemPeriod" ) )
	{
		int milliseconds = oRhoConf.getInt("LogMemPeriod");
		setCollectMemoryInfoInterval(milliseconds);
	}
}
Ejemplo n.º 2
0
void LogSettings::loadFromConf(rho::common::RhoSettings& 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").c_str() );
    if ( oRhoConf.isExist( "MaxLogFileSize") )
        setMaxLogFileSize( oRhoConf.getInt("MaxLogFileSize") );
    if ( oRhoConf.isExist( "LogCategories") )
        setEnabledCategories( oRhoConf.getString("LogCategories").c_str() );
    if (oRhoConf.isExist( "ExcludeLogCategories") )
        setDisabledCategories( oRhoConf.getString("ExcludeLogCategories").c_str() );
    if ( oRhoConf.isExist( "LogToSocket") )
        setLogToSocket( oRhoConf.getBool("LogToSocket") );
    if ( oRhoConf.isExist( "LogSocketHost") )
        m_strLogHost = oRhoConf.getString("LogSocketHost");
    if ( oRhoConf.isExist( "LogSocketPort") )
        m_strLogPort = oRhoConf.getString("LogSocketPort");
}