 |
chamenas Wizard

Joined: 26 Mar 2008 Posts: 1547
|
Posted: Wed Jan 19, 2011 8:21 am
Logging to two files at once? |
Is this possible?
One of the players of the MUD I frequent has created a log playback script which reads a log for very specific info (he actually has an account on these forums too), but I can't imagine the resulting logs look very nice in their regular form since they are filled with Ansi codes and time-stamps.
Thus, I was wondering if I could cause it so that my auto-logging (it starts right when I get in) could write to two different files. One would be the normal HTML file, the "readable" file, while the other would be to a text file which would capture timestamps and ansi codes and be readable by the log playback player. |
|
|
|
 |
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Wed Jan 19, 2011 1:48 pm |
I am pretty sure the answer is "no". You can only have a single logfile open at a time.
However, you could write a script that writes whatever you want to another file, and effectively write your own logger. |
|
|
|
 |
chamenas Wizard

Joined: 26 Mar 2008 Posts: 1547
|
Posted: Wed Jan 19, 2011 5:41 pm |
But it would have to be in the CMUD folder, would it not?
|
|
|
|
 |
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Wed Jan 19, 2011 9:23 pm |
Yes, but the standard logfile would also have to be in the Cmud folder, so this isn't any different. For security reasons, Cmud does not permit writing to files outside of the Cmud folder, not even for logging.
|
|
|
|
 |
charneus Wizard

Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Wed Jan 19, 2011 11:46 pm |
Sure it does. I've written outside the CMUD folder before...
|
|
|
|
 |
|
|
|