// find out what line format to use
if (log_entry_status==RLRC_Unknown) {
- x=-1;
- while (log_entry_status==RLRC_Unknown && x<(int)(sizeof(LogFormats)/sizeof(*LogFormats))) {
+ x=0;
+ while (x<(int)(sizeof(LogFormats)/sizeof(*LogFormats))) {
+ if (LogFormats[x]!=current_format)
+ {
+ memset(&log_entry,0,sizeof(log_entry));
+ log_entry_status=LogFormats[x]->ReadEntry(linebuf,&log_entry);
+ if (log_entry_status!=RLRC_Unknown) break;
+ }
x++;
- if (LogFormats[x]==current_format) continue;
- memset(&log_entry,0,sizeof(log_entry));
- log_entry_status=LogFormats[x]->ReadEntry(linebuf,&log_entry);
}
if (x<0 || x>=(int)(sizeof(LogFormats)/sizeof(*LogFormats))) {
- debuga(_("Unknown line format found in input log file %s\n"),arq);
+ debuga(_("Unknown line format found in input log file %s:\n%s\n"),arq,linebuf);
exit(EXIT_FAILURE);
}
current_format=LogFormats[x];