ChorusOS 4.0 Device Driver Framework Guide

Message Logging

Because messages are processed through the ChorusOS operating system, drivers must never use sysLog or printf directly to display messages. The ChorusOS operating system provides the following macros to handle message logging:

DKI_MSG  ((format, ...))   	// typically does: printf
DKI_WARN ((format, ...)) 				// typically does: printf + syslog
DKI_PANIC((format, ...))  				// typically does: printf + syslog + callDebug
DKI_ERR((format, ... ))					//typically does: printff + syslog

Moreover, message format conventions are as follows:

DKI_MSG   ->  				 "<name>: <message>"
DKI_WARN  ->				 "<name>: warning -- <message>"   
DKI_ERR   ->  				 "<name>: error -- <message>"   
DKI_PANIC ->				 "<name>: panic -- <message>"

where <name> is either: