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
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Sat Sep 04, 2004 7:41 pm   

[HOW-TO] #Log your session
 
Todays lesson is Logging!
Logging comes in three flavors

1. Plain logging //Plain no frills set via View->Prefs
2. Ansi logging //logs with ansi color codes set via View->Prefs
3. Html Logging //makes log.html logs requires this plugin
If you have the plugin installed and wish to use HTML logging instead just replace all instances of #LOG with #HTMLLOG and .txt with .html


To start a log in the Zmud dir
#LOG MyLog.txt

To start a log in a dir relative to zmud. If your path has spaces you need to quote it.
#LOG Folder/MyLog.txt

To start a log in an absolute location. If your path has spaces you need to quote it.
#LOG "C:\Documents and Settings\User\Logs\MyLog.txt"

To timestamp your logfiles use %date logs started more then once on the same timestamp will be appened to unless flagged with {new}.
#LOG MyLog_%time( mm-dd-yy).txt

If you need spaces in your logs path then you have to get tricky to get %time to expand. Notice the quotes end before the %time function and pick up afterwards.
#LOG "Folder One\Mylog_"%time(mm-dd-yy)".txt"

To stop logging just use #log with no arguments
#LOG
---------------------------------

Now that we have the basics of logging down lets set up our Mud so that it Automaticly starts logging when we connect and stops when we disconnect using two built in alias'.

#ALIAS atconnect {#LOG MyLog_%time( mm-dd-yy).txt}
#ALIAS atdisconnect {#LOG}

And now we wan't to rotate our logs at midnight.
#ALARM "LogRotate" {00:00:01} {#SAY Rotating Logs;#LOG MyLog_%time( mm-dd-yy).txt}

-------------------------------

And that is How-to Use #log if you need anymore help don't be afraid to search the forums and ask for help if you still can't get it to work correctly.
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