Skip to content

Commit

Permalink
release
Browse files Browse the repository at this point in the history
  • Loading branch information
abumq committed Feb 27, 2018
1 parent 9c30e18 commit 3e4e2b4
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 28 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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.
Expand Down
36 changes: 18 additions & 18 deletions src/easylogging++.cc
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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<base::threading::Mutex>(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<base::threading::Mutex>(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 {
Expand Down Expand Up @@ -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(""));
Expand Down Expand Up @@ -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
17 changes: 9 additions & 8 deletions src/easylogging++.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -588,10 +588,10 @@ enum class Level : base::type::EnumType {
} // namespace el
namespace std {
template<> struct hash<el::Level> {
public:
std::size_t operator()(const el::Level& l) const {
return hash<el::base::type::EnumType>{}(static_cast<el::base::type::EnumType>(l));
}
public:
std::size_t operator()(const el::Level& l) const {
return hash<el::base::type::EnumType> {}(static_cast<el::base::type::EnumType>(l));
}
};
}
namespace el {
Expand Down Expand Up @@ -2064,7 +2064,8 @@ class TypedConfigurations : public base::threading::ThreadSafe {
}

template <typename Conf_T>
void setValue(Level level, const Conf_T& value, std::unordered_map<Level, Conf_T>* confMap, bool includeGlobalLevel = true) {
void setValue(Level level, const Conf_T& value, std::unordered_map<Level, Conf_T>* 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));
Expand Down Expand Up @@ -2246,7 +2247,7 @@ class LogDispatchData {

};
class LogDispatchCallback : public Callback<LogDispatchData> {
protected:
protected:
virtual void handle(const LogDispatchData* data);
base::threading::Mutex& fileHandle(const LogDispatchData* data);
private:
Expand Down Expand Up @@ -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) {
}

Expand Down

0 comments on commit 3e4e2b4

Please sign in to comment.