/[anubis]/anubis/src/errs.c
ViewVC logotype

Diff of /anubis/src/errs.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by polak, Thu Aug 21 19:37:33 2003 UTC revision 1.8 by polak, Thu Aug 21 20:19:11 2003 UTC
# Line 49  anubis_error(int method, const char *fmt Line 49  anubis_error(int method, const char *fmt
49                                    
50          }          }
51          else if (options.termlevel != SILENT) {          else if (options.termlevel != SILENT) {
52                  char txt[LINEBUFFER+1];                  char msg[LINEBUFFER+1];
53                    
54                  va_start(arglist, fmt);                  va_start(arglist, fmt);
55                  vsnprintf(txt, LINEBUFFER, fmt, arglist);                  vsnprintf(msg, LINEBUFFER, fmt, arglist);
56                  va_end(arglist);                  va_end(arglist);
57  #ifdef HAVE_SYSLOG  #ifdef HAVE_SYSLOG
58                  if ((topt & T_DAEMON) && !(topt & T_FOREGROUND)) {                  if ((topt & T_DAEMON) && !(topt & T_FOREGROUND)) {
59                          if (options.slogfile)                          syslog(LOG_ERR | LOG_MAIL, msg);
                                 filelog(options.slogfile, txt);  
                         else  
                                 syslog(LOG_ERR | LOG_MAIL, txt);  
   
60                          if (options.ulogfile && options.uloglevel >= FAILS)                          if (options.ulogfile && options.uloglevel >= FAILS)
61                                  filelog(options.ulogfile, txt);                                  filelog(options.ulogfile, msg);
62                  }                  }
63                  else                  else
64  #endif /* HAVE_SYSLOG */  #endif /* HAVE_SYSLOG */
65                          if (topt & T_FOREGROUND)                          if (topt & T_FOREGROUND)
66                                  mprintf("%s[%d] %s",                                  mprintf("%s[%d] %s",
67                                          method == SYNTAX ? "" : ">>",                                          method == SYNTAX ? "" : ">>",
68                                          (int)getpid(), txt);                                          (int)getpid(), msg);
69                          else                          else
70                                  mprintf("%s%s",                                  mprintf("%s%s",
71                                          method == SYNTAX ? "" : ">>",                                          method == SYNTAX ? "" : ">>",
72                                          txt);                                          msg);
73          }          }
74          errno = 0;          errno = 0;
75          if (method != SYNTAX && !(topt & T_DAEMON) && !(topt & T_FOREGROUND))          if (method != SYNTAX && !(topt & T_DAEMON) && !(topt & T_FOREGROUND))

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26