check vspnrintf return value, stack-allocate log buffer