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
➜ Suggestions
➜ Limit Log file to a certain size
|
Limit Log file to a certain size
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1 2
| Posted by
| Welcomb
(14 posts) Bio
|
| Date
| Tue 29 Apr 2003 09:40 AM (UTC) |
| Message
| | I log the world activity in html and it could grow to be over 50MB in a few days if there has been a lot of activity. It would be good if there's a feature to limit the log size to a user-defined value such that the log will just keep overwritting the old data in the event the max size is reached. | | Top |
|
| Posted by
| Poromenos
Greece (1,037 posts) Bio
|
| Date
| Reply #1 on Tue 29 Apr 2003 01:34 PM (UTC) |
| Message
| | That would be a bit hard to do, and not really necessary, in my opinion... Just recycle the logs, rename them to the current date/time and zip them... a 50 MB log can zip down to 2-3 MB or so... Also, why log to HTML if you're going to delete old data anyway? I only log important events to HTML, all others in plaintext... |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | | Top |
|
| Posted by
| Nick Gammon
Australia (23,165 posts) Bio
Forum Administrator |
| Date
| Reply #2 on Wed 30 Apr 2003 12:16 AM (UTC) |
| Message
| I'm inclined to agree that it would be better to close and reopen under a different name every 12 hours or so, rather than just overwriting when it happened to fill up, which might be in the middle of an important session. Then you could either delete or zip up the old copies.
You could make a timer that did something like this:
world.CloseLog
world.OpenLog "mylogfile " & Replace (Replace (Now, "/", "-"), ":", "."), 0
What that would do is get the current date and time and replace slashes and colons with dashes and dots (to get a valid file name) and then open that file.
Set the timer to go off every 12 hours or so, and you should be right. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Poromenos
Greece (1,037 posts) Bio
|
| Date
| Reply #3 on Wed 30 Apr 2003 09:31 PM (UTC) |
| Message
| | God, Nick, you really need to get the scripting documentation part of the forum in a HTML help file, i didn't even know about those commands! |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | | Top |
|
| Posted by
| Flannel
USA (1,230 posts) Bio
|
| Date
| Reply #4 on Wed 30 Apr 2003 10:25 PM (UTC) |
| Message
| | Theyre part of VBscript, you can download documentation from the VB section of the forum (a link above it, windows scripting help, or something of the like), that current one includes VBSript, and JavaScript, as well as RegExp, And some other things (FSO, etc) |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | | Top |
|
| Posted by
| Shadowfyr
USA (1,791 posts) Bio
|
| Date
| Reply #5 on Wed 30 Apr 2003 10:47 PM (UTC) |
| Message
| | Nope. Those commands are not VBScript, there are Mushclient internals. As for HTML help... MS HTMLHelp sucks imho, since it is heavilly based off IE and is prone to try to establish a connection to the net if you try to load .html files in it. I have also seen it do the same thing with certain .chm files that 'refer' to .html documents in some cases. This behaviour is, at least for me, stupid and inconvenient, since the idea of a bloody help file is to not have to go online to get information. But I do agree that the existing help is now so far out of date that it almost isn't worth having. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,165 posts) Bio
Forum Administrator |
| Date
| Reply #6 on Wed 30 Apr 2003 11:03 PM (UTC) |
| Message
| Improving the help is next on the major list of things to do.
It probably needs a complete rewrite, which won't be quick. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Flannel
USA (1,230 posts) Bio
|
| Date
| Reply #7 on Thu 01 May 2003 06:12 AM (UTC) |
| Message
| | Replace and Now, are VBscript commands, Open and Closelog are Mushclient commands, But theyre already documented, so I assumed He wasnt referring to thsoe. |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,165 posts) Bio
Forum Administrator |
| Date
| Reply #8 on Thu 01 May 2003 06:33 AM (UTC) |
| Message
| | There is a world.Replace command in the MUSHclient scripting language, however if you leave off "world" you probably get the VBscript one. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Poromenos
Greece (1,037 posts) Bio
|
| Date
| Reply #9 on Thu 01 May 2003 09:30 AM (UTC) |
| Message
| | I was referring to the log commands, i know that replace is a vbscript function :) Anyway, my point was not so much to the .chm file, just make the documentation available offline somehow... I assumed that a .chm would be the easiest to do, since you just point to the index file and the rest is compiled automatically. It does suck, i know, but it's better than reading html files manually :p |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | | Top |
|
| Posted by
| Flannel
USA (1,230 posts) Bio
|
| Date
| Reply #10 on Thu 01 May 2003 10:04 PM (UTC) |
| Message
| | I just made the webpage availiable offline (the one with the scripting info), Set the depth to 1 or 2 links, and let it do its thing... Oddly enough though, it didnt get all of the functions, but it did work for most of them. |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,165 posts) Bio
Forum Administrator |
| Date
| Reply #11 on Fri 02 May 2003 02:22 AM (UTC) |
| Message
| If you bring up the full list first (ie. search with a blank search string) it should return all functions, then making it available offline should find them all.
Maybe, if you didn't do that, the ones that missed out were not cross-referenced anywhere. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Welcomb
(14 posts) Bio
|
| Date
| Reply #12 on Fri 02 May 2003 03:26 PM (UTC) |
| Message
| | Ok i made the script to write a new log file for every session using the code you posted. However it writes the file to my desktop! Is there any way to specify a default log directoy to the one in the MUSHClient folder? the one under Golbal Perference don't seem to work. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,165 posts) Bio
Forum Administrator |
| Date
| Reply #13 on Fri 02 May 2003 10:20 PM (UTC) |
| Message
| The word "mylogfile" was supposed to imply "whereever you want to put it".
Either put in the full pathname yourself, or use world.GetInfo to find the log file directory.
eg.
Solution 1:
world.OpenLog "c:\mushclient-logs\mylogfile " & Replace (Replace (Now, "/", "-"), ":", "."), 0
Solution 2:
world.OpenLog world.GetInfo (58) & "mylogfile " & Replace (Replace (Now, "/", "-"), ":", "."), 0 |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Welcomb
(14 posts) Bio
|
| Date
| Reply #14 on Sat 03 May 2003 06:30 AM (UTC) |
| Message
| | Thanks. I got what you mean. Got it working now | | 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.
50,143 views.
This is page 1, subject is 2 pages long: 1 2
It is now over 60 days since the last post. This thread is closed.
Refresh page
top