beautypg.com

Log and debug levels, Run-time controls – ThingMagic Mercury xPRESS Platform v1.7 User Manual

Page 33

background image

xPRESS Console

A D I V I S I O N O F T R I M B L E

Using the Sample Application

33

Log and Debug Levels

As more modules have been added, each with its own complement of debug messages,

the output of the console has become more complex and potentially confusing. To reduce
the message volume, we have added the ability to suppress less important messages.
This suppression can be done at run-time, via log level controls, or by altering the code
that produces the messages.

Run-time Controls

For debug console messages, we have introduced the CLI command loglevel

loglevel 0 (LOG_OFF: debugging output is disabled)

loglevel 1 (LOG_EMERG: messages that indicate the system is unusable)

loglevel 2 (LOG_ALERT: messages that indicate action must be taken immediately)

loglevel 3 (LOG_CRIT: messages that indicate critical conditions)

loglevel 4 (LOG_ERR: messages that indicate error conditions)

loglevel 5 (LOG_WARNING: messages that indicate warning conditions)

loglevel 6 (LOG_NOTICE: messages that indicate normal conditions)

loglevel 7 (LOG_INFO: informational messages )

loglevel 8 (LOG_DEBUG: debug-level messages)

Note

Selection of a log level enables messages for that level and all more critical
messages (lower numerical value)

The previous CLI command debug is also supported to maintain backward
compatibility. It maps into the new loglevel command as follows:

debug 1 means loglevel 8

debug 0 means loglevel 0

Note

It is not necessary to complete the CLI command on one line when the
console is sending status messages at the same time. However, you must
complete the command without error. If you make an error in typing, hit the