Skip to content

Commit

Permalink
Merge pull request #5407
Browse files Browse the repository at this point in the history
66d73d2 easylogging++: update to v9.96.7 (moneromooo-monero)
  • Loading branch information
fluffypony committed Apr 16, 2019
2 parents 313a56a + 66d73d2 commit c41d026
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 15 deletions.
23 changes: 14 additions & 9 deletions external/easylogging++/easylogging++.cc
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
//
// Bismillah ar-Rahmaan ar-Raheem
//
// Easylogging++ v9.96.5
// Easylogging++ v9.96.7
// Cross-platform logging library for C++ applications
//
// Copyright (c) 2012-2018 Muflihun Labs
// Copyright (c) 2012-2018 Zuhd Web Services
// Copyright (c) 2012-2018 @abumusamq
//
// This library is released under the MIT Licence.
// https://github.com/muflihun/easyloggingpp/blob/master/LICENSE
// https://github.com/zuhd-org/easyloggingpp/blob/master/LICENSE
//
// https://github.com/muflihun/easyloggingpp
// https://muflihun.github.io/easyloggingpp
// https://zuhd.org
// http://muflihun.com
//

Expand Down Expand Up @@ -962,7 +961,7 @@ void Str::replaceFirstWithEscape(base::type::string_t& str, const base::type::st
std::size_t foundAt = base::type::string_t::npos;
while ((foundAt = str.find(replaceWhat, foundAt + 1)) != base::type::string_t::npos) {
if (foundAt > 0 && str[foundAt - 1] == base::consts::kFormatSpecifierChar) {
str.erase(foundAt > 0 ? foundAt - 1 : 0, 1);
str.erase(foundAt - 1, 1);
++foundAt;
} else {
str.replace(foundAt, replaceWhat.length(), replaceWith);
Expand Down Expand Up @@ -1531,7 +1530,7 @@ void LogFormat::parseFromFormat(const base::type::string_t& userFormat) {
if (hasFlag(flag)) {
// If we already have flag we remove the escape chars so that '%%' is turned to '%'
// even after specifier resolution - this is because we only replaceFirst specifier
formatCopy.erase(foundAt > 0 ? foundAt - 1 : 0, 1);
formatCopy.erase(foundAt - 1, 1);
++foundAt;
}
} else {
Expand Down Expand Up @@ -2206,20 +2205,26 @@ Storage::Storage(const LogBuilderPtr& defaultLogBuilder) :
m_registeredLoggers(new base::RegisteredLoggers(defaultLogBuilder)),
m_flags(ELPP_DEFAULT_LOGGING_FLAGS),
m_vRegistry(new base::VRegistry(0, &m_flags)),

#if ELPP_ASYNC_LOGGING
m_asyncLogQueue(new base::AsyncLogQueue()),
m_asyncDispatchWorker(asyncDispatchWorker),
#endif // ELPP_ASYNC_LOGGING

m_preRollOutCallback(base::defaultPreRollOutCallback) {
// Register default logger
m_registeredLoggers->get(std::string(base::consts::kDefaultLoggerId));
// We register default logger anyway (worse case it's not going to register) just in case
m_registeredLoggers->get("default");

#if defined(ELPP_FEATURE_ALL) || defined(ELPP_FEATURE_PERFORMANCE_TRACKING)
// Register performance logger and reconfigure format
Logger* performanceLogger = m_registeredLoggers->get(std::string(base::consts::kPerformanceLoggerId));
m_registeredLoggers->get("performance");
performanceLogger->configurations()->setGlobally(ConfigurationType::Format, std::string("%datetime %level %msg"));
performanceLogger->reconfigure();
#endif // defined(ELPP_FEATURE_ALL) || defined(ELPP_FEATURE_PERFORMANCE_TRACKING)

#if defined(ELPP_SYSLOG)
// Register syslog logger and reconfigure format
Logger* sysLogLogger = m_registeredLoggers->get(std::string(base::consts::kSysLogLoggerId));
Expand Down Expand Up @@ -3279,11 +3284,11 @@ const std::string &Loggers::getFilenameCommonPrefix() {
// VersionInfo

const std::string VersionInfo::version(void) {
return std::string("9.96.5");
return std::string("9.96.7");
}
/// @brief Release date of current version
const std::string VersionInfo::releaseDate(void) {
return std::string("07-09-2018 0950hrs");
return std::string("24-11-2018 0728hrs");
}

} // namespace el
13 changes: 7 additions & 6 deletions external/easylogging++/easylogging++.h
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
//
// Bismillah ar-Rahmaan ar-Raheem
//
// Easylogging++ v9.96.5
// Easylogging++ v9.96.7
// Single-header only, cross-platform logging library for C++ applications
//
// Copyright (c) 2012-2018 Muflihun Labs
// Copyright (c) 2012-2018 Zuhd Web Services
// Copyright (c) 2012-2018 @abumusamq
//
// This library is released under the MIT Licence.
// https://github.com/muflihun/easyloggingpp/blob/master/LICENSE
// https://github.com/zuhd-org/easyloggingpp/blob/master/LICENSE
//
// https://github.com/muflihun/easyloggingpp
// https://muflihun.github.io/easyloggingpp
// https://zuhd.org
// http://muflihun.com
//

Expand Down Expand Up @@ -758,10 +757,12 @@ static const char* kDefaultLoggerId = ELPP_DEFAULT_L
static const char* kDefaultLoggerId = "default";
#endif

#if defined(ELPP_FEATURE_ALL) || defined(ELPP_FEATURE_PERFORMANCE_TRACKING)
#ifdef ELPP_DEFAULT_PERFORMANCE_LOGGER
static const char* kPerformanceLoggerId = ELPP_DEFAULT_PERFORMANCE_LOGGER;
#else
static const char* kPerformanceLoggerId = "performance";
#endif // ELPP_DEFAULT_PERFORMANCE_LOGGER
#endif

#if defined(ELPP_SYSLOG)
Expand Down Expand Up @@ -3836,7 +3837,7 @@ class Helpers : base::StaticClass {
return ELPP->hasCustomFormatSpecifier(formatSpecifier);
}
static inline void validateFileRolling(Logger* logger, Level level) {
if (logger == nullptr) return;
if (ELPP == nullptr || logger == nullptr) return;
logger->m_typedConfigurations->validateFileRolling(level, ELPP->preRollOutCallback());
}
};
Expand Down

0 comments on commit c41d026

Please sign in to comment.