Logs


I am an administrator for a MUD.  I like to keep track of people that are coming and
going, as well as system error messages and such.  It would be handy to keep this
information in a central area, or, better yet, store it in a file.  RMC has the capability
to log things wo application windows or to files, or to both.

Create a log object

To have a log, one must have a log object.  Log objects are defined using the 'Edit'
capability of the client.  Click on 'Edit' and then click on the 'Logs' tab.  This will show
you some information on the logs that have been defined for the connection being
edited.

A list of all log definitions will take up a majority of the view.  This will have a complete
listing of all the logs for the connection.  If no log objects are defined, then the list will
naturally be blank.  Click on 'New' to create a new log.  A log titled 'NewLog' will appear
in the list.  Above the list are two text entry areas as well as a toggle button.  The top
text area contains the name that the application should use when manipulating or
communicating with the log object.  The next text entry area is the filename associated
with the log object.  Leave this blank if a log file is unwanted.  The toggle button will
determine if the application should log things to a window for the user.  'Push it in' to
let RMC create and use log windows for this object.  Otherwise, leave it 'pushed out.'

The #log meta-command

Open the connection that has the newly created log object.  Once the connection is
open, give this command (without the <> symbols):
#log <name_of_log_object> Hi there!  This is a log message!
The message 'Hi there!  This is a log message!' will be logged to the file given to the
log object, if any.  It will also be displayed in a log window if logging to a window has been
enabled for the log object.

Logs and triggers

To truly take advantage of this feature, triggers must be used.  Let's say I wanted to log
all 'tells' to me.  First, I must create a trigger for this.  Review the 'Triggers' section if
necessary.  My trigger rule would be:
(.*) tells you '(.*)'
and we want the client to perform the following command:
#log tell &*
This will log all tells to a log object called 'tell', so now I should create the log object.
I edit the connection, click on 'Logs', click on 'New', and a new log is created for me.  I
change the name from 'NewLog' to 'tell'.  I want it to log things to a file called 
'/home/ron/tells', so I enter '/home/ron/tells' into the 'File for log:' entry area.  I also
want things to be logged to a window, so I click on the 'Also log to window' toggle
button.  I save the edit session.  Now, whenever someone tells me something, the
application will write out the tell to /home/ron/tells and will put the tell into a window.

Misc.

The #log command can be entered from the command line.  This is handy if you wish
to put some sort of remark into a log for your reference.

If a log window is accidently closed, the application will recreate the log the next time
the window is needed, so don't fret if you accidently close a log window.

It is possible but pointless to log things to neither a file or a window.

Log names cannot have spaces.