Log4c giving segmentation fault when changing the priority.
Brought to you by:
valtri
The example application_1 is giving segmentation fault when I make it running at appender="myrollingfileappender" and then changing the priority at run time of running the application. I have compiled the package with --enable-reread option. And tested this behaviour with appender="stdout".
Please let me know, if this is a known bug or if I am not implementing it right.
appender_type_rollingfile.c:168
/* only attempt the write if the policy implem says I can */
if ( rc <= ROLLINGPOLICY_ROLLOVER_ERR_CAN_LOG ) {
+ if (rfup->rfu_current_fp == NULL)
+ rollingfile_open(this);
rc = fprintf(rfup->rfu_current_fp, a_event->evt_rendered_msg);
rfup->rfu_current_file_size += strlen(a_event->evt_rendered_msg);
the solution provided above does work!
thanks!
Last edit: terry yuan 2015-08-04