break;
case 3 : //writing a minimal data
(void) clock_gettime(CLOCK_REALTIME,&(log->start));
- (void) fprintf(log->file,"#%s\n",ctime(&(log->start.tv_sec)));
+ (void) fprintf(log->file,"#%s",ctime(&(log->start.tv_sec)));
+ (void) fflush(log->file);
log->start.tv_sec=0;
break;
default : //SAFE guard
phase=999;
}
break;
+ case 3 : //string the formated line within logs
+ (void) fprintf(log->file,"%s %s\n",chrono,line);
+ (void) fflush(log->file);
+ break;
default : //SAFE guard
line=rou_freestr(line);
proceed=false;
status=tcp_getline(contact->socptr,&attend,&line);
(void) rou_alert(0,"%s, JMPDBG tcp_getline status='%d'",OPEP,status);
if (status<=0) { //timeout or trouble?
- (void) rou_alert(0,"%s, lost contact",OPEP);
+ (void) log_fprintlog(contact->logptr,false,"%s","Lost contact with remote");
+ (void) rou_alert(0,"%s, JMPDBG lost contact",OPEP);
break; //no need to go further
}
(void) log_fprintlog(contact->logptr,false,"%s",line);