Skip to content

Commit

Permalink
Merge pull request #630 from muflihun/develop
Browse files Browse the repository at this point in the history
update to release
  • Loading branch information
abumq authored Apr 3, 2018
2 parents 8092189 + 1ebc9bb commit 66a3a87
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 32 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.3**
> **Manual For v9.96.4**
[![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)
Expand Down Expand Up @@ -107,7 +107,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.3. For other versions please refer to corresponding [release](https://github.com/muflihun/easyloggingpp/releases) on github.
This manual is for Easylogging++ v9.96.4. 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
58 changes: 30 additions & 28 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.3
// Easylogging++ v9.96.4
// Cross-platform logging library for C++ applications
//
// Copyright (c) 2012-2018 Muflihun Labs
Expand Down Expand Up @@ -2756,17 +2756,19 @@ namespace debug {

// StackTrace

StackTrace::StackTraceEntry::StackTraceEntry(std::size_t index, const std::string& loc, const std::string& demang, const std::string& hex,
const std::string& addr) :
m_index(index),
m_location(loc),
m_demangled(demang),
m_hex(hex),
m_addr(addr) {
StackTrace::StackTraceEntry::StackTraceEntry(std::size_t index, const std::string& loc, const std::string& demang,
const std::string& hex,
const std::string& addr) :
m_index(index),
m_location(loc),
m_demangled(demang),
m_hex(hex),
m_addr(addr) {
}

std::ostream& operator<<(std::ostream& ss, const StackTrace::StackTraceEntry& si) {
ss << "[" << si.m_index << "] " << si.m_location << (si.m_hex.empty() ? "" : "+") << si.m_hex << " " << si.m_addr << (si.m_demangled.empty() ? "" : ":") << si.m_demangled;
ss << "[" << si.m_index << "] " << si.m_location << (si.m_hex.empty() ? "" : "+") << si.m_hex << " " << si.m_addr <<
(si.m_demangled.empty() ? "" : ":") << si.m_demangled;
return ss;
}

Expand All @@ -2786,23 +2788,23 @@ void StackTrace::generateNew(void) {
char** strings = backtrace_symbols(stack, size);
if (size > kStackStart) { // Skip StackTrace c'tor and generateNew
for (std::size_t i = kStackStart; i < size; ++i) {
std::string mangName;
std::string location;
std::string hex;
std::string addr;

// entry: 2 crash.cpp.bin 0x0000000101552be5 _ZN2el4base5debug10StackTraceC1Ev + 21
const std::string line(strings[i]);
auto p = line.find("_");
if (p != std::string::npos) {
mangName = line.substr(p);
mangName = mangName.substr(0, mangName.find(" +"));
}
p = line.find("0x");
if (p != std::string::npos) {
addr = line.substr(p);
addr = addr.substr(0, addr.find("_"));
}
std::string mangName;
std::string location;
std::string hex;
std::string addr;

// entry: 2 crash.cpp.bin 0x0000000101552be5 _ZN2el4base5debug10StackTraceC1Ev + 21
const std::string line(strings[i]);
auto p = line.find("_");
if (p != std::string::npos) {
mangName = line.substr(p);
mangName = mangName.substr(0, mangName.find(" +"));
}
p = line.find("0x");
if (p != std::string::npos) {
addr = line.substr(p);
addr = addr.substr(0, addr.find("_"));
}
// Perform demangling if parsed properly
if (!mangName.empty()) {
int status = 0;
Expand Down Expand Up @@ -3092,11 +3094,11 @@ void Loggers::clearVModules(void) {
// VersionInfo

const std::string VersionInfo::version(void) {
return std::string("9.96.3");
return std::string("9.96.4");
}
/// @brief Release date of current version
const std::string VersionInfo::releaseDate(void) {
return std::string("01-04-2018 1128hrs");
return std::string("03-04-2018 1019hrs");
}

} // namespace el
5 changes: 3 additions & 2 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.3
// Easylogging++ v9.96.4
// Single-header only, cross-platform logging library for C++ applications
//
// Copyright (c) 2012-2018 Muflihun Labs
Expand Down Expand Up @@ -3558,7 +3558,8 @@ class StackTrace : base::NoCopy {
static const unsigned int kStackStart = 2; // We want to skip c'tor and StackTrace::generateNew()
class StackTraceEntry {
public:
StackTraceEntry(std::size_t index, const std::string& loc, const std::string& demang, const std::string& hex, const std::string& addr);
StackTraceEntry(std::size_t index, const std::string& loc, const std::string& demang, const std::string& hex,
const std::string& addr);
StackTraceEntry(std::size_t index, const std::string& loc) :
m_index(index),
m_location(loc) {
Expand Down

0 comments on commit 66a3a87

Please sign in to comment.