struct userfilestruct *ufile1;
struct ReadLogStruct log_entry;
struct LogLineStruct log_line;
+ FILE *UseragentLog=NULL;
LogLine_Init(&log_line);
LogLine_File(&log_line,arq);
denied_write(&log_entry);
authfail_write(&log_entry);
if (download_flag) download_write(&log_entry,download_url);
+ if (log_entry.UserAgent)
+ {
+ if (!UseragentLog)
+ UseragentLog=UserAgent_Open();
+ UserAgent_Write(UseragentLog,log_entry.Ip,log_entry.User,log_entry.UserAgent);
+ }
if (log_line.current_format!=&ReadSargLog) {
if (period.start.tm_year==0 || idata<mindate || compare_date(&period.start,&log_entry.EntryTime)>0){
debuga(__FILE__,__LINE__,_("Read error in \"%s\": %s\n"),arq,FileObject_GetLastCloseError());
exit(EXIT_FAILURE);
}
+ if (UseragentLog) fclose(UseragentLog);
if (ShowReadStatistics) {
if (ShowReadPercent)
printf(_("SARG: Records in file: %lu, reading: %3.2f%%\n"),recs2, (float) 100 );