Add log_exc_printf() with stack trace
This commit is contained in:
@@ -15,7 +15,9 @@
|
||||
#include <pvxs/log.h>
|
||||
|
||||
#include <envDefs.h>
|
||||
#include <dbDefs.h>
|
||||
#include <osiSock.h>
|
||||
#include <epicsStackTrace.h>
|
||||
#include <epicsString.h>
|
||||
#include <epicsAssert.h>
|
||||
#include <epicsStdio.h>
|
||||
@@ -65,6 +67,13 @@ const char* log_prefix(const char* name, Level lvl)
|
||||
return prefix;
|
||||
}
|
||||
|
||||
void log_stacktrace()
|
||||
{
|
||||
// stack traces can be long. flush to reduce truncation
|
||||
errlogFlush();
|
||||
epicsStackTrace();
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
|
||||
namespace {
|
||||
|
||||
Reference in New Issue
Block a user