]> git.ipfire.org Git - thirdparty/sarg.git/blobdiff - smartfilter.c
Append \n at the end of every debuga
[thirdparty/sarg.git] / smartfilter.c
index 1ecb57ee56dd3c74b97b290a33e54bc98547aee2..74f0ddd83bd4e5e28c1a17911217086f17743926 100644 (file)
@@ -71,24 +71,24 @@ void smartfilter_report(void)
    }
 
    if (!fgets(period,sizeof(period),fp_in)) {
-      debuga(_("(smartfilter) read error in %s"),per);
+      debuga(_("(smartfilter) read error in %s\n"),per);
       exit(1);
    }
    fclose(fp_in);
 
    if (snprintf(csort,sizeof(csort),"sort -n -k 1,1 -k 2,2 -k 3,3 -o \"%s\" \"%s\"",smart_ou,smart_in)>=sizeof(csort)) {
-      debuga(_("cannot build the sort command to sort file %s"),smart_in);
+      debuga(_("cannot build the sort command to sort file %s\n"),smart_in);
       exit(1);
    }
    cstatus=system(csort);
    if (!WIFEXITED(cstatus) || WEXITSTATUS(cstatus)) {
-      debuga(_("sort command return status %d"),WEXITSTATUS(cstatus));
-      debuga(_("sort command: %s"),csort);
+      debuga(_("sort command return status %d\n"),WEXITSTATUS(cstatus));
+      debuga(_("sort command: %s\n"),csort);
       exit(1);
    }
    if((fp_in=fopen(smart_ou,"r"))==NULL) {
-      fprintf(stderr, "SARG: (smartfilter) %s: %s\n",_("Cannot open log file"),smart_ou);
-      debuga(_("sort command: %s"),csort);
+      debuga(_("(smartfilter) Cannot open log file: %s\n"),smart_ou);
+      debuga(_("sort command: %s\n"),csort);
       exit(1);
    }
    unlink(smart_in);
@@ -121,13 +121,13 @@ void smartfilter_report(void)
       if (getword(user,sizeof(user),&gwarea,'\t')<0 || getword(data,sizeof(data),&gwarea,'\t')<0 ||
           getword(hora,sizeof(hora),&gwarea,'\t')<0 || getword(ip,sizeof(ip),&gwarea,'\t')<0 ||
           getword(url,sizeof(url),&gwarea,'\t')<0 || getword(smartcat,sizeof(smartcat),&gwarea,'\n')<0) {
-         debuga(_("There is e a broken record or garbage in file %s"),smart_ou);
+         debuga(_("There is a broken record or garbage in file %s\n"),smart_ou);
          exit(1);
       }
 
       uinfo=userinfo_find_from_id(user);
       if (!uinfo) {
-         debuga(_("Unknown user ID %s in file %s"),user,smart_ou);
+         debuga(_("Unknown user ID %s in file %s\n"),user,smart_ou);
          exit(1);
       }
       if(strcmp(ouser,user) != 0) {