printf("[%s %s] %s: %s: %d\n", \
__DATE__, __TIME__, __FILE__, __func__, __LINE__);
Kernel-mode driver:
#ifdef MY_DEBUG
printf("[%s %s] %s: %s: %d\n", \
__DATE__, __TIME__, __FILE__, __FUNCTION__, __LINE__);
#endif
Description:
Macros | Features |
---|---|
__FILE__ | File name of the current string |
__FUNCTION__ or __func__ | Current string function name |
__LINE__ | The current line number is an integer |
__DATE__ | String current date |
__TIME__ | String current time |