libsigrok can now be told at which loglevel to work, i.e., how many
debug/error/warning output to generate. You can also query the current
loglevel.
In sigrok-cli it is now possible to set the loglevel via -l. For example:
- Disable all output: sigrok-cli -l 0
- Only show errors: sigrok-cli -l 1
- Show errors, warnings, info, and debug messages: sigrok-cli -l 4
We should use these (internal) functions in libsigrok exclusively from
now on, i.e. no more use of glib's g_debug() etc.
These functions are only for libsigrok, the frontends use whatever
logging mechanism is suitable there.