Fix stack trace generation
The stack traces weren't logged as the LOG_ALERT priority wasn't enabled by default. As an alert is intended to be something that must leave a trace somewhere, and as such, it must not be possible to disable it. For this reason, it is acceptable to always log the message if the priority is LOG_ALERT. Added the -rdynamic linker flag so that all symbols are exported when linking MaxScale. As the stack trace is printed in a signal handler, the first attempt should be to print the stack trace to the standard output. This way the output is printed before an attempt to use malloc is made when it is logged to the logfile.
This commit is contained in:
@ -109,7 +109,7 @@ void mxs_log_get_throttling(MXS_LOG_THROTTLING* throttling);
|
||||
static inline bool mxs_log_priority_is_enabled(int priority)
|
||||
{
|
||||
assert((priority & ~LOG_PRIMASK) == 0);
|
||||
return MXS_LOG_PRIORITY_IS_ENABLED(priority);
|
||||
return MXS_LOG_PRIORITY_IS_ENABLED(priority) || priority == LOG_ALERT;
|
||||
}
|
||||
|
||||
int mxs_log_message(int priority,
|
||||
|
Reference in New Issue
Block a user