next up previous contents
Next: Zephyr Classes and Instances Up: Recieving Zephyrgrams Previous: How To Ignore People   Contents

Logging your Zephyrgrams

You can log zephyrgrams to a file as well as receiving them on your screen with fairly simple additions to your .zwgc.desc.

If you want to save the complete zephyrgram (everything you see on your screen), you should add the following things to your .zwgc.desc file. First, near the beginning of the file, before any of the code that actually places and formats zephyrgrams, you need to add the line

appendport "outf" getenv("HOME")+"/.zlog"

which basically tells .zwgc.desc that ``outf'' refers to a file in your home directory called .zlog.

Then, wherever you want a particular kind of zephyrgram (like personal zephyrgrams, or all zephyrgrams to a particular instance) to be logged in the file, you would need to find where those zephyrgrams are specified in the .zwgc.desc file and add the line

put "outf"

after the line that should already be there that says just put.

Another thing that can easily done with this is to log Zephygrams only if a certain variable is set. To do this, instead of just adding the put "outf" line mentioned above, you would add several lines of code. Near the beginning of your .zwgc desc, you would put the line:

set log = zvar("log")

Then, in the locations where the zephyrgrams you want to log are dealt with, instead of just putting put "outf", you would add the lines

if ($log == "true") then
put "outf"
endif

Then, to start logging zephyrgrams, you would need to type

zctl set log "true"

and to stop logging them, you would need to type

zctl unset log


next up previous contents
Next: Zephyr Classes and Instances Up: Recieving Zephyrgrams Previous: How To Ignore People   Contents
Arun A Tharuvai 2004-04-08