MCPcopy Create free account
hub / github.com/DreamSourceLab/DSView / dsv_clear_log_file

Function dsv_clear_log_file

DSView/pv/log.cpp:87–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87void 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
109void dsv_set_log_file_enable(bool flag)
110{

Callers 1

on_clear_log_fileMethod · 0.85

Calls 3

get_dsv_log_pathFunction · 0.85
ToUnicodePathFunction · 0.85
xlog_reset_log_fileFunction · 0.85

Tested by

no test coverage detected