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

Diff of /anubis/src/log.c

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

revision 1.1.1.1 by polak, Thu Jan 30 10:41:06 2003 UTC revision 1.2 by polak, Fri Feb 28 20:45:05 2003 UTC
# Line 35  mprintf(char *format, ...) Line 35  mprintf(char *format, ...)
35                  return;                  return;
36    
37          va_start(arglist, format);          va_start(arglist, format);
38          #ifdef HAVE_VSNPRINTF  #ifdef HAVE_VSNPRINTF
39          vsnprintf(txt, LINEBUFFER,          vsnprintf(txt, LINEBUFFER,
40          #else  #else
41          vsprintf(txt,          vsprintf(txt,
42          #endif /* HAVE_VSNPRINTF */  #endif /* HAVE_VSNPRINTF */
43                  format, arglist);                  format, arglist);
44          va_end(arglist);          va_end(arglist);
45    
# Line 57  info(int mode, char *format, ...) Line 57  info(int mode, char *format, ...)
57                  return;                  return;
58    
59          va_start(arglist, format);          va_start(arglist, format);
60          #ifdef HAVE_VSNPRINTF  #ifdef HAVE_VSNPRINTF
61          vsnprintf(txt, LINEBUFFER,          vsnprintf(txt, LINEBUFFER,
62          #else  #else
63          vsprintf(txt,          vsprintf(txt,
64          #endif /* HAVE_VSNPRINTF */  #endif /* HAVE_VSNPRINTF */
65                  format, arglist);                  format, arglist);
66          va_end(arglist);          va_end(arglist);
67    
68          #ifdef HAVE_SYSLOG  #ifdef HAVE_SYSLOG
69          if ((topt & T_DAEMON) && !(topt & T_FOREGROUND)) {          if ((topt & T_DAEMON) && !(topt & T_FOREGROUND)) {
70                  if (options.slogfile)                  if (options.slogfile)
71                          filelog(options.slogfile, txt);                          filelog(options.slogfile, txt);
# Line 76  info(int mode, char *format, ...) Line 76  info(int mode, char *format, ...)
76                          filelog(options.ulogfile, txt);                          filelog(options.ulogfile, txt);
77          }          }
78          else          else
79          #endif /* HAVE_SYSLOG */  #endif /* HAVE_SYSLOG */
80                  if (topt & T_FOREGROUND)                  if (topt & T_FOREGROUND)
81                          mprintf("> [%d] %s", (int)getpid(), txt);                          mprintf("> [%d] %s", (int)getpid(), txt);
82                  else                  else

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.2

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