Minor, but If the msg is always literal string, then you could do just: printf("log_debug: " msg "\n", ##__VA_ARGS__);