Skip to content

Commit

Permalink
Merge pull request #667 from muflihun/develop
Browse files Browse the repository at this point in the history
9.96.5
  • Loading branch information
abumq authored Sep 6, 2018
2 parents 66a3a87 + f01c1f8 commit 1f78ad8
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 28 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log

## [9.96.5] - 07-09-2018
### Fixes
- Check for level enabled when using custom log message (Advanced) (issue #666)
- Ignore interruption signal crash log

## [9.96.4] - 03-04-2018
### Fixes
- Fixes seg fault with global lock (issue #580)
Expand Down
26 changes: 0 additions & 26 deletions MESSAGE.md

This file was deleted.

3 changes: 3 additions & 0 deletions src/easylogging++.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2855,6 +2855,9 @@ static std::string crashReason(int sig) {
}
/// @brief Logs reason of crash from sig
static void logCrashReason(int sig, bool stackTraceIfAvailable, Level level, const char* logger) {
if (sig == SIGINT && ELPP->hasFlag(el::LoggingFlag::IgnoreSigInt)) {
return;
}
std::stringstream ss;
ss << "CRASH HANDLED; ";
ss << crashReason(sig);
Expand Down
7 changes: 5 additions & 2 deletions src/easylogging++.h
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,9 @@ enum class LoggingFlag : base::type::EnumType {
/// @brief Adds spaces b/w logs that separated by left-shift operator
AutoSpacing = 8192,
/// @brief Preserves time format and does not convert it to sec, hour etc (performance tracking only)
FixedTimeFormat = 16384
FixedTimeFormat = 16384,
// @brief Ignore SIGINT or crash
IgnoreSigInt = 32768,
};
namespace base {
/// @brief Namespace containing constants used internally.
Expand Down Expand Up @@ -3187,7 +3189,8 @@ class Writer : base::NoCopy {
}

Writer(LogMessage* msg, base::DispatchAction dispatchAction = base::DispatchAction::NormalLog) :
m_msg(msg), m_line(0), m_logger(nullptr), m_proceed(false), m_dispatchAction(dispatchAction) {
m_msg(msg), m_level(msg != nullptr ? msg->level() : Level::Unknown),
m_line(0), m_logger(nullptr), m_proceed(false), m_dispatchAction(dispatchAction) {
}

virtual ~Writer(void) {
Expand Down

0 comments on commit 1f78ad8

Please sign in to comment.