int comedi_loglevel (int loglevel);
This function affects the output of debugging and error messages from Comedilib. By increasing the loglevel, additional debugging information will be printed. Error and debugging messages are printed to the stream stderr.
The default loglevel can be set by using the environment variable COMEDI_LOGLEVEL. The default loglevel is 1.
In order to conserve resources, some debugging information is disabled by default when Comedilib is compiled.
The meaning of the loglevels is as follows:
COMEDI_LOGLEVEL=0 Comedilib prints nothing.
COMEDI_LOGLEVEL=1 (default) Comedilib prints error messages when there is a self-consistency error (i.e., an internal bug.)
COMEDI_LOGLEVEL=2 Comedilib prints an error message when an invalid parameter is passed.
COMEDI_LOGLEVEL=3 Comedilib prints an error message whenever an error is generated in the Comedilib library or in the C library, when called by Comedilib.
COMEDI_LOGLEVEL=4 Comedilib prints a lot of junk.
This function returns the previous loglevel.