Next: Sample C application using "wildcarding" Up: Sample Applications Previous: Sample C application
#include <cmlog.h>
cmlog_client_t client; /* client pointer */
client = cmlog_open (argv[0]); /* set up client connection */
cmlog_new_slac_filter(); /* create/install SLAC filter */
/* first throttle... */
cml_string ("text", /* in field "text" */
2, /* allow 2 messages */
10, /* every 10 seconds */
"agv"); /* matching substring "agv" */
/* second throttle... */
cml_long ("foo", /* in field "foo" */
1, /* allow 1 message */
60, /* every 60 seconds */
(long)101); /* when its value == 101 */
cml_show (); /* display list of throttles */
cml_off (); /* disable all throttles */
cml_on (); /* re-enable all throttles */