UserReportLimit=0;
debug=0;
debugz=0;
- debugm=0;
iprel=false;
userip=false;
realt=false;
strcpy(Title,_("Squid User Access Report"));
- while((ch = getopt_long(argc, argv, "a:b:c:d:e:f:g:hikl:L:mno:P:prs:t:u:Vw:xyz",long_options,&option_index)) != -1){
+ while((ch = getopt_long(argc, argv, "a:b:c:d:e:f:g:hikl:L:no:P:prs:t:u:Vw:xyz",long_options,&option_index)) != -1){
switch(ch)
{
case 0:
NRedirectorLogs++;
RedirectorLogFromCmdLine++;
break;
- case 'm':
- debugm++;
- break;
case 'n':
dns=true;
break;
debuga("\n");
}
- if(debugm) {
- const char *file;
- printf(_("Parameters:\n"));
- printf(_(" Hostname or IP address (-a) = %s\n"),addr);
- printf(_(" Useragent log (-b) = %s\n"),uagent);
- printf(_(" Exclude file (-c) = %s\n"),hexclude);
- printf(_(" Date from-until (-d) = %s\n"),ReadFilter.DateRange);
- printf(_(" Email address to send reports (-e) = %s\n"),email);
- printf(_(" Config file (-f) = %s\n"),ConfigFile);
- if (df=='e')
- printf(_(" Date format (-g) = Europe (dd/mm/yyyy)\n"));
- else if (df=='u')
- printf(_(" Date format (-g) = USA (mm/dd/yyyy)\n"));
- else if (df=='w')
- printf(_(" Date format (-g) = Sites & Users (yyyy/ww)\n"));
- printf(_(" IP report (-i) = %s\n"),(iprel) ? _("Yes") : _("No"));
- printf(_(" Keep temporary files (-k) = %s\n"),(KeepTempLog) ? _("Yes") : _("No"));
- FIter=FileListIter_Open(AccessLog);
- while ((file=FileListIter_NextWithMask(FIter))!=NULL)
- printf(_(" Input log (-l) = %s\n"),file);
- FileListIter_Close(FIter);
- for (iarq=0 ; iarq<NRedirectorLogs ; iarq++)
- printf(_(" Redirector log (-L) = %s\n"),RedirectorLogs[iarq]);
- printf(_(" Resolve IP Address (-n) = %s\n"),(Ip2Name) ? _("Yes") : _("No"));
- printf(_(" Output dir (-o) = %s\n"),outdir);
- printf(_("Use Ip Address instead of userid (-p) = %s\n"),(UserIp) ? _("Yes") : _("No"));
- printf(_(" Accessed site (-s) = %s\n"),site);
- printf(_(" Time (-t) = %s\n"),hm_str);
- printf(_(" User (-u) = %s\n"),us);
- printf(_(" Temporary dir (-w) = %s\n"),tmp);
- printf(_(" Debug messages (-x) = %s\n"),(debug) ? _("Yes") : _("No"));
- printf(_(" Process messages (-z) = %d\n"),debugz);
- printf(_(" Previous reports to keep (--lastlog) = %d\n"),LastLog);
- printf(_("sarg version: %s\n"),VERSION);
- }
-
if(debug)
debuga(_("sarg version: %s\n"),VERSION);
}
totregsl++;
- if(debugm)
+ if (debugz>=LogLevel_Data)
printf("BUF=%s\n",linebuf);
// process the line
}
idata=builddia(log_entry.EntryTime.tm_mday,log_entry.EntryTime.tm_mon+1,log_entry.EntryTime.tm_year+1900);
- if(debugm)
+ if (debugz>=LogLevel_Data)
printf("DATE=%s IDATA=%d DFROM=%d DUNTIL=%d\n",Filter->DateRange,idata,dfrom,duntil);
if (EarliestDate<0 || idata<EarliestDate) {
}
}
- if(debugm){
+ if (debugz>=LogLevel_Data){
printf("IP=\t%s\n",log_entry.Ip);
printf("USER=\t%s\n",log_entry.User);
printf("ELAP=\t%ld\n",log_entry.ElapsedTime);