b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

log4cpp_log4qt_log4j与log4cp区别(7)

电脑杂谈  发布时间:2016-12-26 03:02:23  来源:网络整理

}

sd_debug("]");

return(decision);

}

/*******************************************************************************/

static int timewin_rollover(log4c_rollingpolicy_t *this, FILE ** current_fpp ){

int rc = 0;

rollingpolicy_timewin_udata_t *swup = log4c_rollingpolicy_get_udata(this);

int k = 0;

char * szFileName = NULL;

sd_debug("timewin_rollover[");

if ( !swup || !swup->sw_logdir){

sd_error("rollingpolicy '%s' not yet configured (logdir,prefix etc.)",

log4c_rollingpolicy_get_name(this));

}

else

{

k = swup->sw_flags;

if (k > 0 || *current_fpp == NULL)

{

szFileName = timewin_get_filename(swup);

if (*current_fpp)

{

if(fclose(*current_fpp)){

sd_error("failed to close current log file");

rc = 1;

}

}

if (!rc && timewin_open_file(szFileName, current_fpp)){

sd_error("open zero file failed");

}

free(szFileName);

}

}

sd_debug("]");

return(rc);

}

/*******************************************************************************/

static int timewin_init(log4c_rollingpolicy_t *this, rollingfile_udata_t *rfup){

rollingpolicy_timewin_udata_t *swup =NULL;

sd_debug("timewin_init[");

if (!this){

goto timewin_init_exit;

}

swup = log4c_rollingpolicy_get_udata(this);

if ( swup == NULL ){

swup = timewin_make_udata();

log4c_rollingpolicy_set_udata(this, swup);

}

swup->sw_logdir = rollingfile_udata_get_logdir(rfup);

swup->sw_files_prefix = rollingfile_udata_get_files_prefix(rfup);

timewin_check_update_fileflag(swup);

timewin_init_exit:

sd_debug("]");

return(0);

}

/*******************************************************************************/


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-23402-7.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    • 孙棨
      孙棨

      你永远是我们的浪漫功夫熊猫

    • 黄水村
      黄水村

      因为直接守住小日本的出口要道

    热点图片
    拼命载入中...