Merge pull request #60 from MaddTheSane/printflike
Add printf-like macros to MVKLogImpl and mvkNotifyErrorWithText.
This commit is contained in:
commit
d1a5128448
@ -176,6 +176,7 @@ extern "C" {
|
|||||||
* Combine the specified log level and format string, then log
|
* Combine the specified log level and format string, then log
|
||||||
* the specified args to one or both of ASL and printf.
|
* the specified args to one or both of ASL and printf.
|
||||||
*/
|
*/
|
||||||
|
static inline void MVKLogImplV(bool logToPrintf, bool logToASL, int aslLvl, const char* lvlStr, const char* format, va_list args) __printflike(5, 0);
|
||||||
static inline void MVKLogImplV(bool logToPrintf, bool logToASL, int aslLvl, const char* lvlStr, const char* format, va_list args) {
|
static inline void MVKLogImplV(bool logToPrintf, bool logToASL, int aslLvl, const char* lvlStr, const char* format, va_list args) {
|
||||||
|
|
||||||
// Combine the level and format string
|
// Combine the level and format string
|
||||||
@ -190,6 +191,7 @@ static inline void MVKLogImplV(bool logToPrintf, bool logToASL, int aslLvl, cons
|
|||||||
* Combine the specified log level and format string, then log
|
* Combine the specified log level and format string, then log
|
||||||
* the specified args to one or both of ASL and printf.
|
* the specified args to one or both of ASL and printf.
|
||||||
*/
|
*/
|
||||||
|
static inline void MVKLogImpl(bool logToPrintf, bool logToASL, int aslLvl, const char* lvlStr, const char* format, ...) __printflike(5, 6);
|
||||||
static inline void MVKLogImpl(bool logToPrintf, bool logToASL, int aslLvl, const char* lvlStr, const char* format, ...) {
|
static inline void MVKLogImpl(bool logToPrintf, bool logToASL, int aslLvl, const char* lvlStr, const char* format, ...) {
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, format);
|
va_start(args, format);
|
||||||
|
@ -103,7 +103,7 @@ char* mvkResultName(VkResult vkResult, char* name);
|
|||||||
*
|
*
|
||||||
* - Logs the error code and message to the console
|
* - Logs the error code and message to the console
|
||||||
*/
|
*/
|
||||||
VkResult mvkNotifyErrorWithText(VkResult vkErr, const char* errFmt, ...);
|
VkResult mvkNotifyErrorWithText(VkResult vkErr, const char* errFmt, ...) __printflike(2, 3);
|
||||||
|
|
||||||
|
|
||||||
#pragma mark -
|
#pragma mark -
|
||||||
|
Loading…
x
Reference in New Issue
Block a user