/[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.4 by polak, Fri Jun 6 06:52:01 2003 UTC revision 1.5 by gray, Thu Aug 14 12:30:39 2003 UTC
# Line 24  Line 24 
24    
25  #include "headers.h"  #include "headers.h"
26  #include "extern.h"  #include "extern.h"
27    #include "rcfile.h"
28    
29  void  void
30  mprintf(char *format, ...)  mprintf(char *format, ...)
# Line 98  filelog(char *logfile, char *txt) Line 99  filelog(char *logfile, char *txt)
99          return;          return;
100  }  }
101    
102    void
103    trace(RC_LOC *loc, const char *fmt, ...)
104    {
105            va_list ap;
106            int n = 0;
107            char txt[LINEBUFFER];
108    
109            if (VERBOSE > options.termlevel)
110                    return;
111    
112            if (loc)
113                    n = snprintf(txt, sizeof(txt), "%s:%lu: ",
114                                 loc->file, (unsigned long)loc->line);
115            va_start(ap, fmt);
116            vsnprintf(txt + n, sizeof(txt) - n, fmt, ap);
117            va_end(ap);
118            info(VERBOSE, "%s", txt);
119    }
120    
121  /* EOF */  /* EOF */
122    

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

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