(file) Return to Log.c CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Executor

Diff for /pegasus/src/Executor/Log.c between version 1.1.2.1 and 1.1.2.2

version 1.1.2.1, 2007/01/04 04:43:33 version 1.1.2.2, 2007/01/07 21:38:58
Line 36 
Line 36 
 #include <syslog.h> #include <syslog.h>
 #include <string.h> #include <string.h>
 #include <stdarg.h> #include <stdarg.h>
   #include "Strlcpy.h"
   #include "Strlcat.h"
  
 static enum LogLevel _level = LL_INFORMATION; static enum LogLevel _level = LL_INFORMATION;
  
Line 64 
Line 66 
         LOG_NOTICE, /* LL_INFORMATION */         LOG_NOTICE, /* LL_INFORMATION */
         LOG_INFO, /* LL_TRACE */         LOG_INFO, /* LL_TRACE */
     };     };
       static const char* _prefix[] =
       {
           "fatal",
           "severe",
           "warning",
           "information",
           "trace"
       };
       char prefixedFormat[EXECUTOR_BUFFER_SIZE];
   
       /* Prefix the format with the log level. */
   
       Strlcpy(prefixedFormat, _prefix[(int)type], sizeof(prefixedFormat));
       Strlcat(prefixedFormat, ": ", sizeof(prefixedFormat));
       Strlcat(prefixedFormat, format, sizeof(prefixedFormat));
  
     /* This array maps Pegasus "log levels" to syslog priorities. */     /* This array maps Pegasus "log levels" to syslog priorities. */
  
Line 71 
Line 88 
     {     {
         va_list ap;         va_list ap;
         va_start(ap, format);         va_start(ap, format);
         vsyslog(_priorities[(int)type], format, ap);          vsyslog(_priorities[(int)type], prefixedFormat, ap);
         va_end(ap);         va_end(ap);
     }     }
 } }


Legend:
Removed from v.1.1.2.1  
changed lines
  Added in v.1.1.2.2

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2