|
derekconlon Newbie
Joined: 25 Nov 2015 Posts: 8
|
Posted: Sun Mar 06, 2016 11:46 pm
CMUD and Logging |
I'm trying to write a C# program that reads the .txt files generated by CMUD logging my MUD session.
CMUD doesn't appear to change the lastwrite time or lastaccess information for the file during every write?
C# only detects the file being updated every minute or so.
Is there anyway to change this and make CMUD logs allow C# to detect every change?
Or if my question doesn't make sense, is there any way to get more info on how the #LOG command is working?
when i type #log and turn the logging off C# detects it everytime so my guess is that for some reason CMUD isn't updating the lastwrite, lastaccess or size (those are the 3 attributes i'm looking for in C#) during every write.
Not sure if there is a fix for this but it would be nice if I could actively monitor a log file for CMUD.
or is there another solution to write to a file that wont slow down the computer drastically? like #write or something?
Thanks for any assistance. |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Mon Mar 07, 2016 1:22 am |
The behavior is based more on the OS than anything else, and you already have a solution. You can use a trigger or alarm to close and reopen the log file by using the #LOG command. Closing the file forces the OS to write the data out and update the time stamps.
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
|
|