Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
derekconlon
Newbie


Joined: 25 Nov 2015
Posts: 8

PostPosted: 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.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: 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
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net