Skip to content

Commit

Permalink
Merge pull request #775 from amrayn/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
abumq authored Dec 25, 2020
2 parents 1490004 + fa10a79 commit 49da71d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ Please note, date/time is limited to `30` characters at most.
You can also specify your own format specifiers. In order to do that you can use `el::Helpers::installCustomFormatSpecifier`. A perfect example is `%ip_addr` for TCP server application;
```C++
const char* getIp(void) {
const char* getIp(const el::LogMessage*) {
return "192.168.1.1";
}
Expand Down
2 changes: 1 addition & 1 deletion src/easylogging++.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1524,7 +1524,7 @@ void LogFormat::parseFromFormat(const base::type::string_t& userFormat) {
// For date/time we need to extract user's date format first
std::size_t dateIndex = std::string::npos;
if ((dateIndex = formatCopy.find(base::consts::kDateTimeFormatSpecifier)) != std::string::npos) {
while (dateIndex > 0 && formatCopy[dateIndex - 1] == base::consts::kFormatSpecifierChar) {
while (dateIndex != std::string::npos && dateIndex > 0 && formatCopy[dateIndex - 1] == base::consts::kFormatSpecifierChar) {
dateIndex = formatCopy.find(base::consts::kDateTimeFormatSpecifier, dateIndex + 1);
}
if (dateIndex != std::string::npos) {
Expand Down
2 changes: 1 addition & 1 deletion src/easylogging++.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ ELPP_INTERNAL_DEBUGGING_OUT_INFO << ELPP_INTERNAL_DEBUGGING_MSG(internalInfoStre
# define ELPP_INTERNAL_INFO(lvl, msg)
#endif // (defined(ELPP_DEBUG_INFO))
#if (defined(ELPP_FEATURE_ALL)) || (defined(ELPP_FEATURE_CRASH_LOG))
# if (ELPP_COMPILER_GCC && !ELPP_MINGW && !ELPP_OS_ANDROID && !ELPP_OS_EMSCRIPTEN && !ELPP_OS_QNX)
# if (ELPP_COMPILER_GCC && !ELPP_MINGW && !ELPP_CYGWIN && !ELPP_OS_ANDROID && !ELPP_OS_EMSCRIPTEN && !ELPP_OS_QNX)
# define ELPP_STACKTRACE 1
# else
# if ELPP_COMPILER_MSVC
Expand Down

0 comments on commit 49da71d

Please sign in to comment.