Skip to content

Commit

Permalink
Merge pull request #1758 from Expensify/main
Browse files Browse the repository at this point in the history
Update expensify_prod branch
  • Loading branch information
coleaeason authored May 30, 2024
2 parents fb76041 + a8aad30 commit c335d91
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 4 additions & 0 deletions libstuff/SLog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
atomic<int> _g_SLogMask(LOG_INFO);

void SLogStackTrace(int level) {
// If the level isn't set in the log mask, nothing more to do
if (!(_g_SLogMask & (1 << level))) {
return;
}
// Output the symbols to the log
void* callstack[100];
int depth = backtrace(callstack, 100);
Expand Down
4 changes: 1 addition & 3 deletions libstuff/libstuff.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,7 @@ typedef map<string, SString, STableComp> STable;
// (for DEBUG) a stack trace at the same time. They can take, 1, 2, or all 3 of the components of an HTTP response as arguments.
#define STHROW(...) \
do { \
if (_g_SLogMask & (1 << LOG_DEBUG)) { \
SLogStackTrace(LOG_DEBUG); \
} \
SLogStackTrace(LOG_DEBUG); \
throw SException(__FILE__, __LINE__, false, __VA_ARGS__); \
} while (false)

Expand Down

0 comments on commit c335d91

Please sign in to comment.