Added external measure command

This commit is contained in:
ftc
2020-12-08 20:33:52 +03:00
parent bd5a629fde
commit 68bb96a301
3 changed files with 48 additions and 14 deletions
+5 -5
View File
@@ -49,7 +49,7 @@ void LogFile::InitLogging(string logpath, int method, string prefix, bool reopen
file = OpenFileWithRetries(filename.str(), "at");
if (file == NULL)
{
throw (string)("Unable to open file for logging");
throw (string)("Unable to open file \"" + filename.str() + "\"for logging");
}
}
else
@@ -64,8 +64,8 @@ void LogFile::InitLogging(string logpath, int method, string prefix, bool reopen
file = OpenFileWithRetries(filename.str(), "at");
lastname = filename.str();
if (file == NULL)
{
throw (string)("Unable to open file for logging");
{
throw (string)("Unable to open file \"" + filename.str() + "\"for logging");
}
}
}
@@ -105,8 +105,8 @@ void LogFile::LogString(string s, string pfx)
filename << logpath << "/" << fileprefix << ".log";
file = OpenFileWithRetries(filename.str(), "at");
if (file == NULL)
{
throw (string)("Unable to open file for logging");
{
throw (string)("Unable to open file \"" + filename.str() + "\"for logging");
pthread_mutex_unlock(&filemutex);
return;
}