dual loging

From: Daniel Staudt (dstaudt@HOTMAIL.COM)
Date: 07/27/98


in util.c replace basic_mud_log with
void basic_mud_log(const char *format, ...)
{
  va_list args;
  time_t ct = time(0);
  char *time_s = asctime(localtime(&ct));

  time_s[strlen(time_s) - 1] = '\0';

  fprintf(logfile, "%-15.15s :: ", time_s + 4);
  fprintf(stdout, "%-15.15s :: ", time_s + 4);

  va_start(args, format);
  vfprintf(logfile, format, args);
  vfprintf(stdout, format, args);
  va_end(args);

  fprintf(logfile, "\n");
  fprintf(stdout, "\n");
  fflush(logfile);
  fflush(stdout);
}

in config.c change:
/* What file to log messages to (ex: "log/syslog").  Setting this to
NULL
 *  means you want to log to stderr, which was the default in earlier
 * versions of Circle.
 */
char *LOGNAME = NULL;
/* char *LOGNAME = "log/syslog";  -- useful for Windows users */
to
/* What file to log messages to (ex: "log/syslog").  Setting this to
NULL
 *  means you want to log to stderr, which was the default in earlier
 * versions of Circle.
 */
char *LOGNAME = "log/syslog";
/* now always outputs to stdout and above file */


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST