Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Bug reports
➜ Delayed Logging
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Vchat20
USA (7 posts) Bio
|
| Date
| Thu 12 Oct 2006 02:29 AM (UTC) |
| Message
| So yeah. I have recently been converting my MUSHing systems to using mushclient simply because of its overall flexibility totally owning simplemu which is what I have been using before this point.
Now I have a server machine running here which coincidentally runs on a 24/7 basis. As such I have been using SimpleMU and stay connected to my MUSH and it takes care of logging every single thing on the MUSH for me so if anything does happen to go wrong or something of that sort, I can go back and look in logs. Part of that is ive got a scheduled batch script to copy the log file to a different directory, timestamp it, and wipe said log file clean for simplemu to continue about its business.
NOW to the point. I have got this set up in MC right now, but my biggest miff is MC seems to delay posting the new lines on the MUSH to the log by quite a bit of time. Whereas Simplemu was pretty much *snap fingers* instant. Is there something im missing here maybe? Any help would greatly be appreciated. Thanks. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,165 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Thu 12 Oct 2006 03:50 AM (UTC) |
| Message
| Most operating systems cache up disk file data into a sector (possibly 512 bytes) before writing it, for efficiency.
This could account for the delays in the log being updated if you read it into another application.
I have added a new script funcion - FlushLog - to version 3.82.
If you want to have the log updated quickly, get that version (when it is released) and make a timer that does "FlushLog ()" every second or so. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| David Haley
USA (3,881 posts) Bio
|
| Date
| Reply #2 on Thu 12 Oct 2006 09:30 AM (UTC) |
| Message
| It's possible that SimpleMU opens the log file for append, writes the log stuff, and then closes it immediately. That would explain why it's "instant". I imagine that Nick doesn't open/close the file all the time, for efficiency, and as a result Windows doesn't get around to writing to disk until the buffer is of a reasonable size.
The advantage to the SimpleMU method is that it's "instant", and doesn't lock the log file. Nick's method is more efficient for disk writes.
Nick, I'm not sure what IO method you're using, but I think that C++ streams have a flag you can set such that they don't buffer output and instead flush immediately. Perhaps that could be a checkbox option if people cared, assuming it's as easy as I believe C++ streams make it. But the timer option is also perfectly fine. It's probably a specialized enough problem where you don't need an option for everyone (since relatively few people will care). |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
11,733 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top