swebb2066 commented on code in PR #170:
URL: https://github.com/apache/logging-log4cxx/pull/170#discussion_r1057411668
##########
src/main/include/log4cxx/logger.h:
##########
@@ -25,6 +25,10 @@
#include <log4cxx/helpers/resourcebundle.h>
#include <log4cxx/helpers/messagebuffer.h>
+#if defined(LOG4CXX_ENABLE_STACKTRACE)
Review Comment:
We could now reduce the need to set LOG4CXX_ENABLE_STACKTRACE in the build
macros using:
```
#ifndef __has_include
#if defined(LOG4CXX_ENABLE_STACKTRACE)
#include <boost/stacktrace.hpp>
#define LOG4CXX_STACKTRACE ::log4cxx::MDC mdc_("stacktrace", LOG4CXX_EOL +
boost::stacktrace::to_string(boost::stacktrace::stacktrace()));
#endif
#elif __has_include(<stacktrace>)
#include <stacktrace>
#define LOG4CXX_STACKTRACE ::log4cxx::MDC mdc_("stacktrace", LOG4CXX_EOL +
std::stacktrace::to_string(std::stacktrace::stacktrace()));
#elif __has_include(<boost/stacktrace.hpp>)
#include <boost/stacktrace.hpp>
#define LOG4CXX_STACKTRACE ::log4cxx::MDC mdc_("stacktrace", LOG4CXX_EOL +
boost::stacktrace::to_string(boost::stacktrace::stacktrace()));
#endif
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]