-
-
Notifications
You must be signed in to change notification settings - Fork 935
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
15 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/////////////////////////////////////////////////////////////////////////// | ||
// // | ||
// easylogging++.h - Core of EasyLogging++ // | ||
// EasyLogging++ v3.16 // | ||
// EasyLogging++ v3.17 // | ||
// Cross platform logging made easy for C++ applications // | ||
// Author Majid Khan <[email protected]> // | ||
// http://www.icplusplus.com // | ||
|
@@ -314,15 +314,12 @@ static inline void updateDateFormat(void) { | |
const char* timeFormatLocal = "%H:%M:%S"; | ||
if (::easyloggingpp::showDate) { | ||
strcpy(::easyloggingpp::dateFormat, dateFormatLocal); | ||
} | ||
else if ((::easyloggingpp::showDateTime) || (::easyloggingpp::showTime)) { | ||
if (::easyloggingpp::showDateTime) { | ||
strcpy(::easyloggingpp::dateFormat, dateFormatLocal); | ||
strcat(::easyloggingpp::dateFormat, " "); | ||
strcat(::easyloggingpp::dateFormat, timeFormatLocal); | ||
} else if (::easyloggingpp::showTime) { | ||
strcpy(::easyloggingpp::dateFormat, timeFormatLocal); | ||
} | ||
} else if (::easyloggingpp::showTime) { | ||
strcpy(::easyloggingpp::dateFormat, timeFormatLocal); | ||
} else if (::easyloggingpp::showDateTime) { | ||
strcpy(::easyloggingpp::dateFormat, dateFormatLocal); | ||
strcat(::easyloggingpp::dateFormat, " "); | ||
strcat(::easyloggingpp::dateFormat, timeFormatLocal); | ||
} | ||
} | ||
|
||
|
@@ -383,14 +380,14 @@ static void writeLog(void) { | |
::easyloggingpp::cleanStream(); | ||
} | ||
|
||
static void updateFormatValue(const std::string& replaceWhat, const std::string& replaceWith, std::string& str) { | ||
static void updateFormatValue(const std::string& formatSpecifier, const std::string& value, std::string& currentFormat) { | ||
size_t foundAt = -1; | ||
while ((foundAt = str.find(replaceWhat, foundAt + 1)) != std::string::npos){ | ||
if (str.substr(foundAt, 1) == "\\") { | ||
str = str.erase(foundAt - 2, 1); | ||
while ((foundAt = currentFormat.find(formatSpecifier, foundAt + 1)) != std::string::npos){ | ||
if (currentFormat.substr(foundAt, 1) == "\\") { | ||
currentFormat = currentFormat.erase(foundAt - 2, 1); | ||
foundAt++; | ||
} else { | ||
str = str.replace(foundAt, replaceWhat.size(), replaceWith); | ||
currentFormat = currentFormat.replace(foundAt, formatSpecifier.size(), value); | ||
break; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.