Skip to content

Commit f508c0c

Browse files
authored
Merge pull request #619 from muflihun/develop
release
2 parents 430a317 + 3e4e2b4 commit f508c0c

File tree

3 files changed

+29
-28
lines changed

3 files changed

+29
-28
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
![banner]
66

7-
> **Manual For v9.96.1**
7+
> **Manual For v9.96.2**
88
99
[![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)
1010

@@ -101,7 +101,7 @@
101101
# Overview
102102
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.
103103

104-
This manual is for Easylogging++ v9.96.1. For other versions please refer to corresponding [release](https://github.com/muflihun/easyloggingpp/releases) on github.
104+
This manual is for Easylogging++ v9.96.2. For other versions please refer to corresponding [release](https://github.com/muflihun/easyloggingpp/releases) on github.
105105

106106
> You may also be interested in [Residue](https://github.com/muflihun/residue/) logging server.
107107

src/easylogging++.cc

+18-18
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// Bismillah ar-Rahmaan ar-Raheem
33
//
4-
// Easylogging++ v9.96.1
4+
// Easylogging++ v9.96.2
55
// Cross-platform logging library for C++ applications
66
//
77
// Copyright (c) 2012-2018 Muflihun Labs
@@ -2101,18 +2101,18 @@ void Storage::setApplicationArguments(int argc, char** argv) {
21012101
// LogDispatchCallback
21022102
void LogDispatchCallback::handle(const LogDispatchData* data) {
21032103
#if defined(ELPP_THREAD_SAFE)
2104-
base::threading::ScopedLock scopedLock(m_fileLocksMapLock);
2105-
std::string filename = data->logMessage()->logger()->typedConfigurations()->filename(data->logMessage()->level());
2106-
auto lock = m_fileLocks.find(filename);
2107-
if (lock == m_fileLocks.end()) {
2108-
m_fileLocks.emplace(std::make_pair(filename, std::unique_ptr<base::threading::Mutex>(new base::threading::Mutex)));
2109-
}
2104+
base::threading::ScopedLock scopedLock(m_fileLocksMapLock);
2105+
std::string filename = data->logMessage()->logger()->typedConfigurations()->filename(data->logMessage()->level());
2106+
auto lock = m_fileLocks.find(filename);
2107+
if (lock == m_fileLocks.end()) {
2108+
m_fileLocks.emplace(std::make_pair(filename, std::unique_ptr<base::threading::Mutex>(new base::threading::Mutex)));
2109+
}
21102110
#endif
21112111
}
21122112

21132113
base::threading::Mutex& LogDispatchCallback::fileHandle(const LogDispatchData* data) {
2114-
auto it = m_fileLocks.find(data->logMessage()->logger()->typedConfigurations()->filename(data->logMessage()->level()));
2115-
return *(it->second.get());
2114+
auto it = m_fileLocks.find(data->logMessage()->logger()->typedConfigurations()->filename(data->logMessage()->level()));
2115+
return *(it->second.get());
21162116
}
21172117

21182118
namespace base {
@@ -2535,13 +2535,13 @@ void Writer::processDispatch() {
25352535

25362536
void Writer::triggerDispatch(void) {
25372537
if (m_proceed) {
2538-
if (m_msg == nullptr) {
2539-
LogMessage msg(m_level, m_file, m_line, m_func, m_verboseLevel,
2540-
m_logger);
2541-
base::LogDispatcher(m_proceed, &msg, m_dispatchAction).dispatch();
2542-
} else {
2543-
base::LogDispatcher(m_proceed, m_msg, m_dispatchAction).dispatch();
2544-
}
2538+
if (m_msg == nullptr) {
2539+
LogMessage msg(m_level, m_file, m_line, m_func, m_verboseLevel,
2540+
m_logger);
2541+
base::LogDispatcher(m_proceed, &msg, m_dispatchAction).dispatch();
2542+
} else {
2543+
base::LogDispatcher(m_proceed, m_msg, m_dispatchAction).dispatch();
2544+
}
25452545
}
25462546
if (m_logger != nullptr) {
25472547
m_logger->stream().str(ELPP_LITERAL(""));
@@ -3011,11 +3011,11 @@ void Loggers::clearVModules(void) {
30113011
// VersionInfo
30123012

30133013
const std::string VersionInfo::version(void) {
3014-
return std::string("9.96.1");
3014+
return std::string("9.96.2");
30153015
}
30163016
/// @brief Release date of current version
30173017
const std::string VersionInfo::releaseDate(void) {
3018-
return std::string("23-02-2018 1708hrs");
3018+
return std::string("27-02-2018 1135hrs");
30193019
}
30203020

30213021
} // namespace el

src/easylogging++.h

+9-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// Bismillah ar-Rahmaan ar-Raheem
33
//
4-
// Easylogging++ v9.96.1
4+
// Easylogging++ v9.96.2
55
// Single-header only, cross-platform logging library for C++ applications
66
//
77
// Copyright (c) 2012-2018 Muflihun Labs
@@ -588,10 +588,10 @@ enum class Level : base::type::EnumType {
588588
} // namespace el
589589
namespace std {
590590
template<> struct hash<el::Level> {
591-
public:
592-
std::size_t operator()(const el::Level& l) const {
593-
return hash<el::base::type::EnumType>{}(static_cast<el::base::type::EnumType>(l));
594-
}
591+
public:
592+
std::size_t operator()(const el::Level& l) const {
593+
return hash<el::base::type::EnumType> {}(static_cast<el::base::type::EnumType>(l));
594+
}
595595
};
596596
}
597597
namespace el {
@@ -2064,7 +2064,8 @@ class TypedConfigurations : public base::threading::ThreadSafe {
20642064
}
20652065

20662066
template <typename Conf_T>
2067-
void setValue(Level level, const Conf_T& value, std::unordered_map<Level, Conf_T>* confMap, bool includeGlobalLevel = true) {
2067+
void setValue(Level level, const Conf_T& value, std::unordered_map<Level, Conf_T>* confMap,
2068+
bool includeGlobalLevel = true) {
20682069
// If map is empty and we are allowed to add into generic level (Level::Global), do it!
20692070
if (confMap->empty() && includeGlobalLevel) {
20702071
confMap->insert(std::make_pair(Level::Global, value));
@@ -2246,7 +2247,7 @@ class LogDispatchData {
22462247

22472248
};
22482249
class LogDispatchCallback : public Callback<LogDispatchData> {
2249-
protected:
2250+
protected:
22502251
virtual void handle(const LogDispatchData* data);
22512252
base::threading::Mutex& fileHandle(const LogDispatchData* data);
22522253
private:
@@ -3260,7 +3261,7 @@ class Writer : base::NoCopy {
32603261
Writer(Level level, const char* file, base::type::LineNumber line,
32613262
const char* func, base::DispatchAction dispatchAction = base::DispatchAction::NormalLog,
32623263
base::type::VerboseLevel verboseLevel = 0) :
3263-
m_msg(nullptr), m_level(level), m_file(file), m_line(line), m_func(func), m_verboseLevel(verboseLevel),
3264+
m_msg(nullptr), m_level(level), m_file(file), m_line(line), m_func(func), m_verboseLevel(verboseLevel),
32643265
m_logger(nullptr), m_proceed(false), m_dispatchAction(dispatchAction) {
32653266
}
32663267

0 commit comments

Comments
 (0)