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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Cloak
Newbie


Joined: 04 Dec 2004
Posts: 7

PostPosted: Sat Dec 04, 2004 4:22 am   

Log file usage
 
I have set the preference for logging to save the entire buffer when log file is opened, however, when I use the command #log test.txt new only the lines from then on, are saved. The only way I can get the log file to save the entire buffer is when I first start Zmud, and then file -> new log -> test.txt... Is there some sort of command I could use to circumvent this problem, and automatically save the entire buffer to the log when activated via commands?? I plan to use some triggers to automatically save the buffer every couple minutes and use my dynamic web tools to view the mud output in quasi-real time. I can do that now with just log file, but the logs end up getting very large. If I make Zmud automatically overwrite the log every 5 minutes I can keep the size down. However I still like to have the entire day's logs saved. So if I am always logging with log-12/3/04, then stop that logging, run the #log test.txt, then run #clr, and return to #log log-12/3/04.txt. Therefore, the buffer was cleared, but the file appends to the log of the day, and no information is lost. Any ideas?
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Sat Dec 04, 2004 12:03 pm   
 
Your best bet would be to install the HTML logger plugin. http://forums.zuggsoft.com/mx/modules/mx_kb/kb.php?page=3&mode=doc&k=35 has a link to the DL. That way you can have 2 logs open at the same time. (I think this is possible)

#LOG log-.txt
for the normal log

#ALARM "HTMLlog" {-10:00} {#HTMLLOG Html-log.html new}
to overwrite your html log every 10 minutes of connectivitiy
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
Cloak
Newbie


Joined: 04 Dec 2004
Posts: 7

PostPosted: Sat Dec 04, 2004 3:16 pm   Logging, and stuff
 
The link failed to work, and I did some quick searching on the internet, but didn't come up with anything, I'll continue to search for a third-party link to the plugin.
Reply with quote
Cloak
Newbie


Joined: 04 Dec 2004
Posts: 7

PostPosted: Sat Dec 04, 2004 3:49 pm   
 
I"ve located a copy of an htmllogger, I'll test it out and get back..
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Sat Dec 04, 2004 3:53 pm   
 
I found this link http://www.rweiss.ssxh.net/HTMLLog.exe
As with any file you get off the internet please be sure to run a virus scan on it before running it!
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
Cloak
Newbie


Joined: 04 Dec 2004
Posts: 7

PostPosted: Sat Dec 04, 2004 4:12 pm   
 
The problem I'm seeing is when I use the command #htmlog filename new it continues to append to the file, rather then overwriting. I even tried #htmllog {filename} {new} nothing makes it overwrite the file, any ideas?
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Sat Dec 04, 2004 5:41 pm   
 
Hmmmm Perhaps Charbal didn't include that in html log.........

About the only thing I can think of in that case would be something like this but for this to work your log file would have to be in the dir with zmud.exe or a subdir of that

#ALARM "HTMLlog" {-10:00} {
#FILE 1 Html-log.html
#ERASE 1
#CLOSE 1
#HTMLLOG Html-log.html new
}
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
Cloak
Newbie


Joined: 04 Dec 2004
Posts: 7

PostPosted: Sat Dec 04, 2004 5:50 pm   
 
I assumed Charbal had included it, because during the writing of a trigger in the GUI, the syntax shows if you include new, it overwrites the file. Your suggest works, however defeats the purpose of my creation of the file in the first place. The publishing of the website has to be in a specific folder, unless I'm able to move the zmud.exe folder into my webserver folder in order to run it that way, I'll try that and see if anything else pops in your mind.
Reply with quote
Cloak
Newbie


Joined: 04 Dec 2004
Posts: 7

PostPosted: Sat Dec 04, 2004 6:25 pm   
 
The trigger works perfectly, with a minor revision:

#ALARM "HTMLlog" {-10:00} {
#FILE 1 Html-log.html
#ERASE 1
#CLOSE 1
#HTMLLOG Html-log.html new
}

You have to stop the logging before erasing the file, or it will tell you it was erased, but nearly only appended too.

#ALARM "HTMLlog" {-10:00} {
#HTMLLOG
#FILE 1 Html-log.html
#ERASE 1
#CLOSE 1
#HTMLLOG Html-log.html new
}

Works for anyone who had this same idea. Thanks for all the help.
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Sat Dec 04, 2004 6:28 pm   
 
Well if you are running apache you can create a link to something like
c:\zmud\logs and going to http://mysite/logs opens the correct file/folder view depending on permissions
I also believe there is a way to do it in most other Servers too

Fell free to send me a PM and Ill see about finding a way to do it.
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
Cloak
Newbie


Joined: 04 Dec 2004
Posts: 7

PostPosted: Sat Dec 04, 2004 6:29 pm   
 
Actually, I have another question: Is there a way to essentially append backwards? ie. the newst part of the file is at the beginning. for example:

Normal log file:

(auction) Starting bid on 'a mithril helm' at 500 gold.
(auction) This item is being sold by Squire.

<676hp 678m 245mv>
Thewhtnight auctions, 'markup... wow'
(auction) Now accepting bids for 'a mithril helm', minimum bid is 500 gold coins.

Backwards log file:

(auction) Now accepting bids for 'a mithril helm', minimum bid is 500 gold coins.
Thewhtnight auctions, 'markup... wow'
<676hp 678m 245mv>

(auction) This item is being sold by Squire.
(auction) Starting bid on 'a mithril helm' at 500 gold.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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