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.
@@ -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} 返回日志内容
@@ -43,6 +43,7 @@ async function main(ctx, db) {
43
43
  var plus = this.plugin();
44
44
  console.log("获取插件", plus);
45
45
  ret = $.ret.list(plus.log.list());
46
+ plus.log.clear();
46
47
  }
47
48
  // var plus = $.plugin_admin('test');
48
49
  // plus.run("main", "start");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mm_os",
3
- "version": "2.6.3",
3
+ "version": "2.6.4",
4
4
  "description": "这是超级美眉服务端框架,用于快速构建应用程序。",
5
5
  "main": "index.js",
6
6
  "scripts": {