nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: 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. |
|