| 260 | } |
| 261 | |
| 262 | void pushDebugLog(std::string pathDebugStr, int debugNum) |
| 263 | { |
| 264 | while (debugNum > 1) { |
| 265 | std::string orginPath = pathDebugStr + "."; |
| 266 | std::string destPath = orginPath; |
| 267 | if (debugNum - 1 < 10) |
| 268 | orginPath += "0"; |
| 269 | if (debugNum < 10) |
| 270 | destPath += "0"; |
| 271 | orginPath += std::to_string(debugNum - 1); |
| 272 | destPath += std::to_string(debugNum); |
| 273 | if (access( destPath.c_str(), F_OK ) != -1) |
| 274 | remove(destPath.c_str()); |
| 275 | rename(orginPath.c_str(), destPath.c_str()); |
| 276 | debugNum--; |
| 277 | } |
| 278 | |
| 279 | } |
| 280 | |
| 281 | int LogPrintStr(const std::string& str, bool useVMLog) |
| 282 | { |