In addition to the configuration file, commands can be sent directly to the Cascade TextLogger at any time while it is running, by using the Cogent lsend utility or your own code. Commands that are commonly issued at run-time include enable and disable, which control the writing activity of each log; the output command that lets you insert a descriptive string into a file; and exit.
The syntax for run-time commands is the same as that used in the configuration file. It consists of the name of the command, followed by a space-separated list of arguments, all enclosed in parentheses, like this:
(command arg1 arg2 arg3 ...)
If you plan to send commands from a Gamma program, say with the send function, the syntax is slightly different. The command name is outside the parentheses, and the arguments are separated by commas, like this:
command (arg1, arg2, arg3, ...)
Should you need to use this Gamma syntax elsewhere, you can use the lsend command with the -g option (or gsend, which is essentially the same thing).
To use lsend for sending commands to the Cascade TextLogger, follow these steps:
[sh]$ nsnames Task Queue Domain Node TaskID /dh/default default default 0 8521 logger logger default 0 19544
[sh]$ lsend nserve-name nserve-name>
[sh]$ lsend logger
logger> (disable log2 log5)
t
logger>
logger> (disable log4)(enable lognone)(output log6 "Continuing...") t logger>nil logger>t logger>
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.