Driver Logging

You can have a driver send log messages to the syslog through the use of the zxlogf(<log_level>,...) macro, which is defined in lib/ddk/debug.h.

Depending on the type of log level, by default, log messages are sent to the following logs:

To control which log levels are sent to the syslog (other than SERIAL), the kernel commandline driver.<driver_name>.log=<level> can be used. For example, driver.sdhci.log=TRACE additionally enables DEBUG and TRACE logs for the sdhci driver, as we are setting a minimum log level, and TRACE is lower than DEBUG.

A driver's logs are tagged with the process name, "driver", and the driver name. This can be used to filter the output of the syslog whilst searching for particular logs.