]> git.ipfire.org Git - thirdparty/sarg.git/blobdiff - totday.c
Append \n at the end of every debuga
[thirdparty/sarg.git] / totday.c
index 40e03b531bd26de697843de7682e4c54841cb1ef..a29638b41bbcc440032d76350f29053c51dc3321 100644 (file)
--- a/totday.c
+++ b/totday.c
@@ -58,20 +58,20 @@ void day_totalize(const char *tmp, const struct userinfostruct *uinfo, int index
    sprintf(csort,"sort -k 1,1 -k 2,2 -o \"%s\" \"%s\"",sortout,wdirname);
    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(sortout,"r"))==NULL) {
-      fprintf(stderr, "SARG: (totday) %s: %s\n",_("Cannot open log file"),sortout);
-      debuga(_("sort command: %s"),csort);
+      debuga(_("SARG: (totday) Cannot open log file: %s\n"),sortout);
+      debuga(_("sort command: %s\n"),csort);
       exit(1);
    }
 
    unlink(wdirname);
 
    if((fp_ou=fopen(arqout,"w"))==NULL) {
-     fprintf(stderr, "SARG: (totday) %s: %s\n",_("Cannot open log file"),arqout);
+     debuga(_("(totday) Cannot open log file: %s\n"),arqout);
      exit(1);
    }
 
@@ -81,7 +81,7 @@ void day_totalize(const char *tmp, const struct userinfostruct *uinfo, int index
       if (getword(data,sizeof(data),&gwarea,'\t')<0 || getword(hora,sizeof(hora),&gwarea,':')<0 ||
           getword(min,sizeof(min),&gwarea,':')<0 || getword_skip(20,&gwarea,'\t')<0 ||
           getword(elap,sizeof(elap),&gwarea,0)<0) {
-         debuga(_("There is a broken record or garbage in file %s"),sortout);
+         debuga(_("There is a broken record or garbage in file %s\n"),sortout);
          exit(1);
       }