Removed unnecessary debug information and return values.
This commit is contained in:
@ -3076,9 +3076,8 @@ static int find_last_seqno(
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Flush all log files synchronously
|
* Flush all log files synchronously
|
||||||
* @return 1 if log flushing was successful, 0 in case an error occurred.
|
|
||||||
*/
|
*/
|
||||||
int skygw_log_force_flush_all()
|
void skygw_log_force_flush_all(void)
|
||||||
{
|
{
|
||||||
int rval = 0, i;
|
int rval = 0, i;
|
||||||
logfile_t* lf;
|
logfile_t* lf;
|
||||||
@ -3086,26 +3085,6 @@ int skygw_log_force_flush_all()
|
|||||||
for (i = LOGFILE_FIRST; i <= LOGFILE_LAST; i <<= 1)
|
for (i = LOGFILE_FIRST; i <= LOGFILE_LAST; i <<= 1)
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifdef SS_DEBUG
|
|
||||||
char debugstr[512];
|
|
||||||
|
|
||||||
switch(i){
|
|
||||||
case LOGFILE_ERROR:
|
|
||||||
sprintf(debugstr,"ERROR");
|
|
||||||
break;
|
|
||||||
case LOGFILE_MESSAGE:
|
|
||||||
sprintf(debugstr,"MESSAGE");
|
|
||||||
break;
|
|
||||||
case LOGFILE_TRACE:
|
|
||||||
sprintf(debugstr,"TRACE");
|
|
||||||
break;
|
|
||||||
case LOGFILE_DEBUG:
|
|
||||||
sprintf(debugstr,"DEBUG");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
skygw_log_write((logfile_id_t)i,"Force flushing LOG_%s",debugstr);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool nflushed = true;
|
bool nflushed = true;
|
||||||
lf = &lm->lm_logfile[(logfile_id_t)i];
|
lf = &lm->lm_logfile[(logfile_id_t)i];
|
||||||
acquire_lock(&lf->lf_spinlock);
|
acquire_lock(&lf->lf_spinlock);
|
||||||
@ -3118,12 +3097,7 @@ int skygw_log_force_flush_all()
|
|||||||
nflushed = lf->lf_flushflag;
|
nflushed = lf->lf_flushflag;
|
||||||
release_lock(&lf->lf_spinlock);
|
release_lock(&lf->lf_spinlock);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SS_DEBUG
|
|
||||||
fprintf(stderr,"Logfile %s flushed.\n",debugstr);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return rval;
|
|
||||||
}
|
}
|
||||||
|
@ -113,7 +113,7 @@ void skygw_logmanager_exit(void);
|
|||||||
void skygw_log_done(void);
|
void skygw_log_done(void);
|
||||||
int skygw_log_write(logfile_id_t id, const char* format, ...);
|
int skygw_log_write(logfile_id_t id, const char* format, ...);
|
||||||
int skygw_log_flush(logfile_id_t id);
|
int skygw_log_flush(logfile_id_t id);
|
||||||
int skygw_log_force_flush_all();
|
void skygw_log_force_flush_all(void);
|
||||||
int skygw_log_rotate(logfile_id_t id);
|
int skygw_log_rotate(logfile_id_t id);
|
||||||
int skygw_log_write_flush(logfile_id_t id, const char* format, ...);
|
int skygw_log_write_flush(logfile_id_t id, const char* format, ...);
|
||||||
int skygw_log_enable(logfile_id_t id);
|
int skygw_log_enable(logfile_id_t id);
|
||||||
|
Reference in New Issue
Block a user