From 3e4e2b484c1b15db36b4112e838689712d609ecc Mon Sep 17 00:00:00 2001 From: mkhan Date: Tue, 27 Feb 2018 11:35:32 +1100 Subject: [PATCH] release --- README.md | 4 ++-- src/easylogging++.cc | 36 ++++++++++++++++++------------------ src/easylogging++.h | 17 +++++++++-------- 3 files changed, 29 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 97fc77ca3..805b0b5ea 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ![banner] -> **Manual For v9.96.1** +> **Manual For v9.96.2** [![Build Status (Master)](https://img.shields.io/travis/muflihun/easyloggingpp/master.svg)](#build-matrix) [![Build Status (Develop)](https://img.shields.io/travis/muflihun/easyloggingpp/develop.svg)](#build-matrix) [![Version](https://img.shields.io/github/release/muflihun/easyloggingpp.svg)](https://github.com/muflihun/easyloggingpp/releases/latest) @@ -101,7 +101,7 @@ # Overview Easylogging++ is single header efficient logging library for C++ applications. It is extremely powerful, highly extendable and configurable to user's requirements. It provides ability to [write your own _sinks_](/samples/send-to-network) (via featured referred as `LogDispatchCallback`). This library is currently used by [hundreds of open-source projects on github](https://github.com/search?q=%22easylogging%2B%2B.h%22&type=Code&utf8=%E2%9C%93) and other open-source source control management sites. -This manual is for Easylogging++ v9.96.1. For other versions please refer to corresponding [release](https://github.com/muflihun/easyloggingpp/releases) on github. +This manual is for Easylogging++ v9.96.2. For other versions please refer to corresponding [release](https://github.com/muflihun/easyloggingpp/releases) on github. > You may also be interested in [Residue](https://github.com/muflihun/residue/) logging server. diff --git a/src/easylogging++.cc b/src/easylogging++.cc index 1ef5543ff..807f61391 100644 --- a/src/easylogging++.cc +++ b/src/easylogging++.cc @@ -1,7 +1,7 @@ // // Bismillah ar-Rahmaan ar-Raheem // -// Easylogging++ v9.96.1 +// Easylogging++ v9.96.2 // Cross-platform logging library for C++ applications // // Copyright (c) 2012-2018 Muflihun Labs @@ -2101,18 +2101,18 @@ void Storage::setApplicationArguments(int argc, char** argv) { // LogDispatchCallback void LogDispatchCallback::handle(const LogDispatchData* data) { #if defined(ELPP_THREAD_SAFE) - base::threading::ScopedLock scopedLock(m_fileLocksMapLock); - std::string filename = data->logMessage()->logger()->typedConfigurations()->filename(data->logMessage()->level()); - auto lock = m_fileLocks.find(filename); - if (lock == m_fileLocks.end()) { - m_fileLocks.emplace(std::make_pair(filename, std::unique_ptr(new base::threading::Mutex))); - } + base::threading::ScopedLock scopedLock(m_fileLocksMapLock); + std::string filename = data->logMessage()->logger()->typedConfigurations()->filename(data->logMessage()->level()); + auto lock = m_fileLocks.find(filename); + if (lock == m_fileLocks.end()) { + m_fileLocks.emplace(std::make_pair(filename, std::unique_ptr(new base::threading::Mutex))); + } #endif } base::threading::Mutex& LogDispatchCallback::fileHandle(const LogDispatchData* data) { - auto it = m_fileLocks.find(data->logMessage()->logger()->typedConfigurations()->filename(data->logMessage()->level())); - return *(it->second.get()); + auto it = m_fileLocks.find(data->logMessage()->logger()->typedConfigurations()->filename(data->logMessage()->level())); + return *(it->second.get()); } namespace base { @@ -2535,13 +2535,13 @@ void Writer::processDispatch() { void Writer::triggerDispatch(void) { if (m_proceed) { - if (m_msg == nullptr) { - LogMessage msg(m_level, m_file, m_line, m_func, m_verboseLevel, - m_logger); - base::LogDispatcher(m_proceed, &msg, m_dispatchAction).dispatch(); - } else { - base::LogDispatcher(m_proceed, m_msg, m_dispatchAction).dispatch(); - } + if (m_msg == nullptr) { + LogMessage msg(m_level, m_file, m_line, m_func, m_verboseLevel, + m_logger); + base::LogDispatcher(m_proceed, &msg, m_dispatchAction).dispatch(); + } else { + base::LogDispatcher(m_proceed, m_msg, m_dispatchAction).dispatch(); + } } if (m_logger != nullptr) { m_logger->stream().str(ELPP_LITERAL("")); @@ -3011,11 +3011,11 @@ void Loggers::clearVModules(void) { // VersionInfo const std::string VersionInfo::version(void) { - return std::string("9.96.1"); + return std::string("9.96.2"); } /// @brief Release date of current version const std::string VersionInfo::releaseDate(void) { - return std::string("23-02-2018 1708hrs"); + return std::string("27-02-2018 1135hrs"); } } // namespace el diff --git a/src/easylogging++.h b/src/easylogging++.h index 4fe02f8f5..391dfefda 100644 --- a/src/easylogging++.h +++ b/src/easylogging++.h @@ -1,7 +1,7 @@ // // Bismillah ar-Rahmaan ar-Raheem // -// Easylogging++ v9.96.1 +// Easylogging++ v9.96.2 // Single-header only, cross-platform logging library for C++ applications // // Copyright (c) 2012-2018 Muflihun Labs @@ -588,10 +588,10 @@ enum class Level : base::type::EnumType { } // namespace el namespace std { template<> struct hash { -public: - std::size_t operator()(const el::Level& l) const { - return hash{}(static_cast(l)); - } + public: + std::size_t operator()(const el::Level& l) const { + return hash {}(static_cast(l)); + } }; } namespace el { @@ -2064,7 +2064,8 @@ class TypedConfigurations : public base::threading::ThreadSafe { } template - void setValue(Level level, const Conf_T& value, std::unordered_map* confMap, bool includeGlobalLevel = true) { + void setValue(Level level, const Conf_T& value, std::unordered_map* confMap, + bool includeGlobalLevel = true) { // If map is empty and we are allowed to add into generic level (Level::Global), do it! if (confMap->empty() && includeGlobalLevel) { confMap->insert(std::make_pair(Level::Global, value)); @@ -2246,7 +2247,7 @@ class LogDispatchData { }; class LogDispatchCallback : public Callback { - protected: + protected: virtual void handle(const LogDispatchData* data); base::threading::Mutex& fileHandle(const LogDispatchData* data); private: @@ -3260,7 +3261,7 @@ class Writer : base::NoCopy { Writer(Level level, const char* file, base::type::LineNumber line, const char* func, base::DispatchAction dispatchAction = base::DispatchAction::NormalLog, base::type::VerboseLevel verboseLevel = 0) : - m_msg(nullptr), m_level(level), m_file(file), m_line(line), m_func(func), m_verboseLevel(verboseLevel), + m_msg(nullptr), m_level(level), m_file(file), m_line(line), m_func(func), m_verboseLevel(verboseLevel), m_logger(nullptr), m_proceed(false), m_dispatchAction(dispatchAction) { }