You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by GitBox <gi...@apache.org> on 2022/12/27 02:53:28 UTC
[GitHub] [logging-log4cxx] swebb2066 commented on a diff in pull request #170: LOGCXX-567
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 avoid the need for LOG4CXX_ENABLE_STACKTRACE using:
```
#ifndef __has_include
#elif __has_include(<stacktrace>)
#include <stacktrace>
#define LOG4CXX_STACKTRACE ::log4cxx::MDC mdc_("stacktrace", LOG4CXX_EOL + std::stacktrace::to_string(boost::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: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org