Difference for common/logger.c from version 1.10 to 1.11


version 1.10 version 1.11
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_loger_c =   * static char *rcsid_loger_c =
  *   "$Id: logger.c,v 1.10 2005/07/15 13:51:49 ryo_saeba Exp $ ";   *   "$Id: logger.c,v 1.11 2006/06/05 12:07:26 tchize Exp $ ";
  */   */
   
 /*  /*
Line 39
 
Line 39
  * See include/logger.h for possible logLevels.  Messages with llevInfo   * See include/logger.h for possible logLevels.  Messages with llevInfo
  * and llevError are always printed, regardless of debug mode.   * and llevError are always printed, regardless of debug mode.
  */   */
   static char* loglevel_names[] = {"[Error]   ",
                                    "[Info]    ",
                                    "[Debug]   ",
                                    "[Monster] "};
 void LOG (LogLevel logLevel, const char *format, ...)  void LOG (LogLevel logLevel, const char *format, ...)
 {  {
   char buf[20480];  /* This needs to be really really big - larger    char buf[20480];  /* This needs to be really really big - larger
Line 55
 
Line 58
   {    {
     vsprintf(buf, format, ap);      vsprintf(buf, format, ap);
 #ifdef WIN32 /* ---win32 change log handling for win32 */  #ifdef WIN32 /* ---win32 change log handling for win32 */
    fputs(loglevel_names[logLevel], logfile);    /* wrote to file or stdout */
  fputs(buf, logfile);    /* wrote to file or stdout */   fputs(buf, logfile);    /* wrote to file or stdout */
 #ifdef DEBUG /* if we have a debug version, we want see ALL output */  #ifdef DEBUG /* if we have a debug version, we want see ALL output */
  fflush(logfile);    /* so flush this! */   fflush(logfile);    /* so flush this! */
 #endif  #endif
  if(logfile != stderr)   /* if was it a logfile wrote it to screen too */     if(logfile != stderr){   /* if was it a logfile wrote it to screen too */
       fputs(loglevel_names[logLevel], stderr);
  fputs(buf, stderr);    fputs(buf, stderr);
     }
 #else  #else
       fputs(loglevel_names[logLevel], logfile);
     fputs(buf, logfile);      fputs(buf, logfile);
 #endif  #endif
   }    }


Legend:
line(s) removed in v.1.10 
line(s) changed
 line(s) added in v.1.11

File made using version 1.98 of cvs2html by leaf at 2011-07-21 17:12