Fix Vivox logging that got broken by LL and delete log files only if debugging is disabled

Ansariel 2014-01-25 22:47:57 +01:00
parent c2aa0e535b
commit ffb5f59306
2 changed files with 15 additions and 5 deletions

View File

@ -787,9 +787,6 @@ LLAppViewer::~LLAppViewer()
destroyMainloopTimeout();
// <FS:Ansariel> Delete useless Vivox logs on logout
gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_EXECUTABLE, ""), "VivoxVoiceService-*.log");
// If we got to this destructor somehow, the app didn't hang.
removeMarkerFile();
}

View File

@ -376,6 +376,13 @@ void LLVivoxVoiceClient::terminate()
{
killGateway();
}
// <FS:Ansariel> Delete useless Vivox logs on logout
if (gSavedSettings.getString("VivoxDebugLevel") == "0")
{
gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_EXECUTABLE, ""), "VivoxVoiceService-*.log");
}
// </FS:Ansariel>
}
//---------------------------------------------------
@ -467,11 +474,17 @@ void LLVivoxVoiceClient::connectorCreate()
setState(stateConnectorStarting);
std::string savedLogLevel = gSavedSettings.getString("VivoxDebugLevel");
if(savedLogLevel != "-0")
// <FS:Ansariel> Fixing Vivox debug level
//if(savedLogLevel != "-0")
if(savedLogLevel != "0")
// </FS:Ansariel>
{
LL_DEBUGS("Voice") << "creating connector with logging enabled" << LL_ENDL;
// <FS:Ansariel> Fixing Vivox debug level
loglevel = "0";
loglevel = "10";
// </FS:Ansariel>
}
stream