In spdk_log() accept filename = NULL. If filename is NULL then source information as well as log level is not displayed. This change allows to replace all usages of printf() and fprintf(stderr,) by SPDK_PRINTF() and SPDK_ERRLOG() which use spdk_log(). Using spdk_log() instead of printf() is always prefered since SPDK can be used inside of another application where SPDK logs could be redirected. SPDK uses printf() places where location info is not needed we cannot replace it by SPDK_NOTICELOG(). This change is in the scope earlier planned task: https://trello.com/c/lZzBjrw3/10-remove-use-of-printf-fprintf-and-perror-for-logging-in-library-code Change-Id: I55c24da4a2092bd118fa2c121092d253cedb1cf8 Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1942 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> |
||
---|---|---|
.. | ||
linux | ||
spdk | ||
spdk_internal | ||
Makefile |