fix error handling for vsnprintf in Logger