libx52  0.3.2
Saitek X52/X52Pro drivers for Linux/Unix
Logging management

The logging commands allow the user to fine tune the logging configuration of x52d as well as adjust the log levels for either all the modules, or for each of the modules individually.

While the -v and -q command line options allow you to either increase the logging verbosity or suppress it entirely, they are required to be specified at program startup. On the other hand, having the logging commands allows the user to fine tune the logging while the daemon is running.

Modules

x52d is split into several modules as far as logging is concerned. The list of modules is below:

  • Config
  • Cllient
  • Clock
  • Command
  • Device
  • IO
  • LED
  • Mouse
  • Notify

Logging levels

The following is a list of supported logging levels. Each level logs the ones above it as well as the current level

  • none - Disable logging entirely
  • fatal - Log fatal messages
  • error - Log error messages
  • warning - Log warning messages
  • info - Log informational messages
  • debug - Log debug messages
  • trace - Log trace messages - useful for tracing program flow.
  • default - Not a level, but used when configuring module log levels, makes the module log level fallback to the global log level.

Show logging configuration

The logging show command takes in an optional module name, as listed in the Modules section above. It returns the module name, if specified, and the log level for that module. If the module is configured to fallback to the global level, then it will return the global level.

Arguments

  • logging
  • show
  • module-name (Optional)

Returns

  • DATA
  • module-name (if specified)
  • log-level

Set logging configuration

The logging set command takes in the optional module name and the log level and sets the log level for that module, if specified, or the global level otherwise.

Arguments

  • logging
  • set
  • module-name (Optional)
  • log-level

Returns

  • OK
  • logging
  • set
  • module-name (if specified)
  • log-level