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
mixvio
Beginner


Joined: 24 Mar 2009
Posts: 13

PostPosted: Tue Mar 24, 2009 5:56 pm   

How do I enable HTML logging?
 
Apologies if this is answered already but I've been searching and can't figure it out.

I'd really like to enable (automatically at connect if possible!) HTML logging in CMUD so that it captures my sessions. If possible I'd like this file to output to a directory outside the installation file of CMUD, organized like, for example, C:\Logs\-Name of MUD-\date.html

I've looked and looked and looked and I can't find an explanation to even get it outputting at all (HTML or text) much less in the format I'd like.

If someone can explain this for me in the most stupid person terms possible I'd really appreciate it, because I can't get it working. Thanks!
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Tue Mar 24, 2009 8:23 pm   
 
Go to Options -> Session -> Logging and enable the Log HTML option.

You can make an onConnect event to start your logging. Something like this should do the trick.
Code:
#LOG %concat("C:\Documents and Settings\Administrator\Desktop\logs\", %time("yyyy-mm-dd"), ".html")
_________________
Asati di tempari!
Reply with quote
mixvio
Beginner


Joined: 24 Mar 2009
Posts: 13

PostPosted: Tue Mar 24, 2009 8:25 pm   
 
Sadly, I don't have an Options > Session menu; I have Options, then the closest thing is Session Properties, but there's nothing about Log HTML in the window or tabs that open up.

I'm using CMUD 2.37.
Reply with quote
mixvio
Beginner


Joined: 24 Mar 2009
Posts: 13

PostPosted: Tue Mar 24, 2009 8:32 pm   
 
Ah I figured it out somewhat;

Under Options > General >Session > Logging there were a few selections, so I checked Log ANSI Color, and Log MXP/HTML

The script you gave me said there's no onConnect command, but I got this to work with some fiddling:

#AL atconnect #LOG %concat("C:\Chatlogs\MUDs\", %time("yyyy-mm-dd"), ".html")

It said in the game on execute that:

Log is on: C:\Chatlogs\MUDs\2009-03-25.html

but when I go to that directory it's empty. Question
Reply with quote
mixvio
Beginner


Joined: 24 Mar 2009
Posts: 13

PostPosted: Tue Mar 24, 2009 8:43 pm   
 
Ah I got it!

#AL atconnect {#LOG %concat("C:\Chatlogs\MUDs\", %time("yyyy-mm-dd"), ".html")}

Works.

The only problem though is that it doesn't start this "atconnect" like I expect it to.
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Tue Mar 24, 2009 9:26 pm   
 
That "atconnect" was a special alias from zMUD days. These were replaced with #EVENTS that are much more powerful. onConnect is the system defined event that replaces the "atconnect" alias. If you click on the link you'll see the documentation for them.
_________________
Asati di tempari!
Reply with quote
mixvio
Beginner


Joined: 24 Mar 2009
Posts: 13

PostPosted: Tue Mar 24, 2009 9:27 pm   
 
So it should be

#EV onConnect {#LOG %concat("C:\Chatlogs\MUDs\", %time("yyyy-mm-dd"), ".html")}

instead?
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Tue Mar 24, 2009 10:10 pm   
 
Yep... something like that should work. At work so I can't confirm it.
_________________
Asati di tempari!
Reply with quote
mixvio
Beginner


Joined: 24 Mar 2009
Posts: 13

PostPosted: Tue Mar 24, 2009 10:41 pm   
 
Yay! That works. :D

Thanks so much for the help.
Reply with quote
mixvio
Beginner


Joined: 24 Mar 2009
Posts: 13

PostPosted: Wed Mar 25, 2009 8:31 am   
 
Okay another question; these commands don't seem to save when I exit CMUD. I have to keep re-entering them each time when I restart or connect to another MUD.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Wed Mar 25, 2009 2:21 pm   
 
Quote:
these commands don't seem to save when I exit CMUD.

What exactly do you mean? Do you mean the onConnect event? Or do you mean your session properties?

Actually, I suspect I know what the problem is. You need to create a session for each character you use in each mud you play in. This session will store your triggers, preferences, and other information specific to that mud connection. I'm afraid that you will have to set your preferences in each one separately (more precisely, for each window object separately). If you want to share triggers, events, aliases, and other such things between several different characters, you need to make a separate package for them. Each session can load that package, and thus use the same set of triggers, etc.
Reply with quote
mixvio
Beginner


Joined: 24 Mar 2009
Posts: 13

PostPosted: Wed Mar 25, 2009 3:03 pm   
 
Rahab wrote:
What exactly do you mean? Do you mean the onConnect event? Or do you mean your session properties?

Actually, I suspect I know what the problem is. You need to create a session for each character you use in each mud you play in. This session will store your triggers, preferences, and other information specific to that mud connection. I'm afraid that you will have to set your preferences in each one separately (more precisely, for each window object separately). If you want to share triggers, events, aliases, and other such things between several different characters, you need to make a separate package for them. Each session can load that package, and thus use the same set of triggers, etc.


I suspected it was something like this that I was getting wrong.

If it's not too much trouble can you explain exactly how I should do it? I only have one character, but I play four different MUDs. I had been connecting to them through the Sessions window that appears in CMUD when you first start it (I'd connect to one MUD, then choose the Sessions button, New Connection Window to access the next.) Is there a better way I should be loading up multiple ones and creating individual sessions? I find the CMUD interface very unintuitive and confusing at times but I just started using it yesterday.
Reply with quote
mixvio
Beginner


Joined: 24 Mar 2009
Posts: 13

PostPosted: Wed Mar 25, 2009 3:15 pm   
 
Hm after saying this, I went through and think I fixed them; trying it several times by connecting to a session at CMUD startup, then pressing the Sessions button (instead of using the New Connection Window drop down) it appears to load the MUDs correctly, load the onConnect command correctly to log, and logs them into the correct directories. It's consistent after repeatedly closing and restarting CMUD.

Is this the way I should handle connecting to multiple MUDs in the same session, or is this still convoluted and likely to cause me problems?
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Wed Mar 25, 2009 5:15 pm   
 
Yes, that is one of several possible ways to connect to several different muds. When you were using "New Connection", you were creating a brand new blank session each time.
Reply with quote
mixvio
Beginner


Joined: 24 Mar 2009
Posts: 13

PostPosted: Wed Mar 25, 2009 5:18 pm   
 
Is there a preferred method? Now suddenly when I do that route, the second MUD tab gets messed up royally and I have to restart CMUD; right now I am actually running two complete instances of CMUD to get connected.

I feel like I broke something. :P
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Thu Mar 26, 2009 2:35 pm   
 
Are you trying to connect to multiple muds or characters at the same time, or are you trying to first do one, close it, and open a new mud?

If the former, I believe you should be able to open a session, and within that session do File|Open Session and open the next one. It will make various tabs across your Cmud window. If you want, you can dock the multiple windows together, arrange them the way you like, and click Layout|Save Session Layout. That will cause that layout to be saved, and the next time you open that first session, it will automatically open the windows for all the others too.

If the latter, what I usually do is to open and play in one session, then do File|Close Window to close it, and click on the next session I want.
Reply with quote
mixvio
Beginner


Joined: 24 Mar 2009
Posts: 13

PostPosted: Fri Mar 27, 2009 3:02 pm   
 
Yeah it's to run multiple muds at the same time. It looks like I got that working.

Question about logging, is there a way to enable timestamps (logging and display) somehow? Either in the system preferences or in that script?
Reply with quote
Leitia
Adept


Joined: 04 May 2007
Posts: 292
Location: Boston

PostPosted: Fri Mar 27, 2009 6:42 pm   
 
I bet if you try that from a script the lines wont flow smoothly, still I have never seen a way to interact with the log. You can open a file and time stamp events but doing a thing like that for each line received wouldn't work because there is the whole UI to consider, unless your mudding only involves monitoring.

You could print time stamps on events, my current mud has dawn and dusk events, then you could factor guesses.

Anyway, I haven't seen log functions like that ever.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Fri Mar 27, 2009 8:35 pm   
 
Click on Options|General. In the Preferences window that pops up, click on Session|Logging. Mark the checkbox labeled "Log timestamps".
Reply with quote
Leitia
Adept


Joined: 04 May 2007
Posts: 292
Location: Boston

PostPosted: Fri Mar 27, 2009 10:48 pm   
 
oooo I feel so wrong, but really I had nothing better to do today
Reply with quote
mixvio
Beginner


Joined: 24 Mar 2009
Posts: 13

PostPosted: Sat Mar 28, 2009 8:47 am   
 
Rahab wrote:
Click on Options|General. In the Preferences window that pops up, click on Session|Logging. Mark the checkbox labeled "Log timestamps".


Hm I did, it's not outputting any timestamps in either the log file or the game window though.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Mon Mar 30, 2009 1:43 pm   
 
First, be sure that you made that setting change in the correct window.

It is possible that timestamps won't go into the log unless you have the timestamps in the window--I haven't tried that. To get timestamps displayed in the window, be sure the correct window is the active window, and click on Options|General. In the Preferences window, click on Session|Scrollback. Mark the checkbox labeled "Show timestamps".
Reply with quote
mixvio
Beginner


Joined: 24 Mar 2009
Posts: 13

PostPosted: Mon Mar 30, 2009 2:44 pm   
 
Ah ha! That got it working; apparently the settings kept getting wiped each restart unless I hit "Save as Default," and now it all logs!

Yay, thank you so much for all your help.
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