mm_os 2.6.3 → 2.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/core/com/plugin/log.js
CHANGED
|
@@ -24,6 +24,19 @@ Log.prototype.init = function(config) {
|
|
|
24
24
|
this.config.filename.addDir();
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* 清空日志
|
|
29
|
+
* @returns {String} 返回日志内容
|
|
30
|
+
*/
|
|
31
|
+
Log.prototype.clear = function() {
|
|
32
|
+
var file = this.config.filename;
|
|
33
|
+
if(file.hasFile()){
|
|
34
|
+
file.delFile();
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
|
|
27
40
|
/**
|
|
28
41
|
* 加载日志
|
|
29
42
|
* @returns {String} 返回日志内容
|