|
Win95 Log Files (II) [by Andy Hubbard] |
|
|
|
Posted Wednesday, August 12th @ 11:39:31 PM, by George Greer in the Utils dept.
Added Mar 26, 1997. Click the link below to read it or download it.
From: Andy Hubbard <hub@leicester.ac.uk>
Subject: Logging to file for Win95 (Part II)
Here's another way of getting log files for Win95
in utils.c search for the void mudlog part,
and change ..
if (file)
fprintf(stderr, "%-19.19s :: %s\n", tmp, str);
printf("%-19.19s :: %s\n", tmp, str); /*logging, Andy */
if (level < 0)
return;
then search for void log
and change ..
ct = time(0);
tmstr = asctime(localtime(&ct));
*(tmstr + strlen(tmstr) - 1) = '\0';
fprintf(stderr, "%-19.19s :: %s\n", tmstr, str);
printf("%-19.19s :: %s\n", tmstr, str); /*logging, Andy */
}
Then in your batch file just run the mud with redirected output of
stdout (printf outputs as stdout, and dos can redirect it),
ie. circle.exe >> log.txt
This will write all the logs to the file, and you will also get it
echoed to your screen!
Andy
<< Win95 Log Files (I) [by Shirak] | Reply | View as text | Flattened | XP per Level and titles [by Nic Suzor/Dave Carver] >> |
|
Related Links |
|
|
|
CircleMUD Snippets |
|
|
Note: Not all of these snippets will work perfectly with
your version of code, so be prepared to fix one
or two bugs that may arise, and please let me know
what you needed to do to fix it. Sending a corrected
version is always welcome.
|
Finally, if you wish to use any of the snippets from this
page, you are more than welcome, just mention the
authors in your credits. If you wish to release any
of these snippets to the public on another site,
contact me FIRST.
|
|
|
|
|
|
|