Exemplo 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( "rhologurl") )
		setLogURL( oRhoConf.getString("rhologurl").c_str() );
	if ( oRhoConf.isExist( "log_exclude_filter") )
        setExcludeFilter( oRhoConf.getString("log_exclude_filter") );
	if ( oRhoConf.isExist( "LogMemPeriod" ) )
	{
		int milliseconds = oRhoConf.getInt("LogMemPeriod");
		setCollectMemoryInfoInterval(milliseconds);
	}
}
Exemplo n.º 2
0
int EDB_KRCB::init(pmdOptions *options)
{
	setDBStatus(EDB_DB_NORMAL);
	setDataFilePath(options->getDBPath());
	setLogFilePath(options->getLogPath());
	strncpy(_pdDiagLogPath, getLogFilePath(), sizeof(_pdDiagLogPath));
	setSvcName(options->getServiceName());
	setMaxPool(options->getMaxPool());
	return _rtnMgr.rtnInitialize();
}	
Exemplo n.º 3
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() );
}
Exemplo n.º 4
0
void LogConfigDialog::selectLogFile()
{
  QString fileExtension;
  QString s = QFileDialog::getSaveFileName(this, tr("Write Log To"), getLogFilePath(), tr("Log(*.log);;Text(*.txt);;All(*.*)"), &fileExtension, QFileDialog::DontUseNativeDialog);
  if (s.length() > 0)
  {
    if (!s.contains('.'))
    {
      if (fileExtension.compare(tr("Log(*.log)"), Qt::CaseInsensitive) == 0)
      {
        s = s + ".log";
      }
      else if (fileExtension.compare(tr("Text(*.txt)"), Qt::CaseInsensitive) == 0)
      {
        s = s + ".txt";
      }
      setLogFilePath(s);
    }
  }
}