From: Robert Baumstark <cst0656@nait.ab.ca>
Subject: Logging to file with Win95

After running under Win95 for a while,I got tired of not having any of
The log files saved to disk, so I came up with a very simple way to fix
it. However, by doing this, the logs will no longer come up on the screen,
so you have to hope all is going well.

Here's how it can be done:
 -------------
 In comm.c
 -------------
 search for:

  int port;
  char buf[512];
  int pos = 1;
  char *dir;
 and add:

  FILE *logfile;

 go down a couple lines, after the port and dir assignments, and add:

  if((logfile=freopen("LOGFILE.LOG", "a", stderr))==NULL)
    fprintf(stderr, "Error redirecting stderr, log files will not be saved\n");
  fprintf(stderr, "\n\n");

 This will simply redirect all of the logs from the screen, to a file called
logfile.log
 At the end of main, you have to add:

  fclose(logfile);

 Then in utils.c, you might have to make a couple of changes, I forget if i
made them,  or if they were already there, but in the log, and mudlog
functions, make sure they    say:

  fprintf(stderr, ....);

 That way, all logs that would normally be written on the screen will be
redirected to   the logfile.log on your disk.  On my machine, during the
testing stages, It saved this  file to the /lib directory, but now that the
mud is up on my friends server, the log is  saved into the root circle
directory, so if you use this, just look around, it'll be  there.  If you
can't find it, try "dir logfile.log /s" from c:\, and it will find it,  if
it exists.

Shirak
