This is a constructor for cmlogClient. This can be only accessed when UNIX applications are compiled. It takes an argument that denote the program name. If no progname is given, default name from command argument will be used on Unix machines.
This is a constructor for cmlogClient on vxWorks.
This is the destructor for cmlogClient. It will close network connection and free all resources.
This method establishes network connection between the logging client and the client daemon. It tries to connect to the daemon in 'connectionRetries' times. If there is no client daemon present, the routine will try to start one. It returns CMLOG_SUCCESS upon successful connection, and returns CMLOG_ERROR upon failure. This routine also sends additional information such as user name, process id to the server once the connection is established.
This routine is very similar to the above routine except that callers have control over what to send to the server upon connection.
This routine disconnect logging clients from the client daemon. It returns CMLOG_SUCCESS upon success, and returns CMLOG_ERROR upon failure.
A convenience routine to log a message to the server. The format string must be in the form of tagged items. It returns CMLOG_SUCCESS, CMLOG_FILTERED or CMLOG_NOCONSERVER.
logMessages (void) { cmlogClient client; if (client.connect () == CMLOG_SUCCESS) client.logMsg (``severity = \%d text = \%s'', 10, ``hello''); }
This routine offers another way to log message with given verbosity, severity, error code, and facility name. The format still must be in the form of tagged items as described in the above routine.
This routine is a general routine to allow programs to log any cdevData into the database. If the data does not contain a valid time stamp, a current time stamp will be issued.
This routine is a general routine to allow programs to log a static cdevData into the database. This rouine is useful for vxworks.
This routine is used to set throttling on a particular tag. After this routine has been called, only 'limit' number of messages will be logged within time interval 'dt'. The 'size' is size of the list holding all throttled messages. It return CMLOG_SUCCESS or CMLOG_ERROR.Note a subsequent this call overrides previous call. In addition number of dropped messages is saved in the subsequent messages using a tag of ``dropped''.
This routine is used to get throttling parameters. It returns CMLOG_SUCCESS if there is a throttling on a particular tag (Callers should free tag after using it). It returns CMLOG_ERROR if there is no throttling.
This routine sets severity threshold. Any messages with severity less than the threshold will not be logged. It return CMLOG_SUCCESS and CMLOG_ERROR.
This routine gets severity threshold.
This routine sets verbosity threshold. Any messages with verbosity larger than the threshold will not be logged. It return CMLOG_SUCCESS and CMLOG_ERROR.
This routine gets verbosity threshold.
This routine is designed for use in the Interrupt Service Routines of vxWorks only. The format must be in the form of tagged items only. It return CMLOG_SUCCESS or CMLOG_ERROR.
This routine is designed for use in the Interrupt Service Routines of vxWorks only. The format must be in the form of tagged items only. It return CMLOG_SUCCESS or CMLOG_ERROR.