| 85 | } |
| 86 | |
| 87 | void dsv_clear_log_file() |
| 88 | { |
| 89 | if (b_logfile && log_ctx) |
| 90 | { |
| 91 | QString lf = get_dsv_log_path(); |
| 92 | std::string log_file = pv::path::ToUnicodePath(lf); |
| 93 | int ret = xlog_reset_log_file(log_ctx, log_file_index, log_file.c_str()); |
| 94 | |
| 95 | if (ret != 0){ |
| 96 | dsv_err("Clear log file error!"); |
| 97 | } |
| 98 | } |
| 99 | else{ |
| 100 | QDir dir; |
| 101 | QString filePath = get_dsv_log_path(); |
| 102 | if (dir.exists(filePath)) |
| 103 | { |
| 104 | dir.remove(filePath); |
| 105 | } |
| 106 | } |
| 107 | } |
| 108 | |
| 109 | void dsv_set_log_file_enable(bool flag) |
| 110 | { |
no test coverage detected