@steedos/service-object-mixin 2.6.8-beta.8 → 2.6.8
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/package.json +2 -2
- package/package.service.js +40 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/service-object-mixin",
|
|
3
|
-
"version": "2.6.8
|
|
3
|
+
"version": "2.6.8",
|
|
4
4
|
"main": "package.service.js",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -13,5 +13,5 @@
|
|
|
13
13
|
"description": "steedos package",
|
|
14
14
|
"repository": {},
|
|
15
15
|
"license": "MIT",
|
|
16
|
-
"gitHead": "
|
|
16
|
+
"gitHead": "2114137be783174e207dac675e75a3597bacdf21"
|
|
17
17
|
}
|
package/package.service.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @Author: sunhaolin@hotoa.com
|
|
3
3
|
* @Date: 2023-03-23 15:12:14
|
|
4
|
-
* @LastEditors:
|
|
5
|
-
* @LastEditTime:
|
|
4
|
+
* @LastEditors: baozhoutao@steedos.com
|
|
5
|
+
* @LastEditTime: 2024-03-10 15:34:58
|
|
6
6
|
* @Description:
|
|
7
7
|
*/
|
|
8
8
|
"use strict";
|
|
@@ -407,8 +407,45 @@ module.exports = {
|
|
|
407
407
|
async handler() {
|
|
408
408
|
return await this.broker.call("objectql.makeNewID")
|
|
409
409
|
}
|
|
410
|
+
},
|
|
411
|
+
getLog: {
|
|
412
|
+
handler: function () {
|
|
413
|
+
return {
|
|
414
|
+
debug: async (message, details)=>{
|
|
415
|
+
return await this.getObject('logs').directInsert({
|
|
416
|
+
'level': 'debug',
|
|
417
|
+
'name': message,
|
|
418
|
+
'details': details,
|
|
419
|
+
'node_id': this.broker.nodeID
|
|
420
|
+
})
|
|
421
|
+
},
|
|
422
|
+
info: async (message, details)=>{
|
|
423
|
+
return await this.getObject('logs').directInsert({
|
|
424
|
+
'level': 'info',
|
|
425
|
+
'name': message,
|
|
426
|
+
'details': details,
|
|
427
|
+
'node_id': this.broker.nodeID
|
|
428
|
+
})
|
|
429
|
+
},
|
|
430
|
+
warn: async (message, details)=>{
|
|
431
|
+
return await this.getObject('logs').directInsert({
|
|
432
|
+
'level': 'warn',
|
|
433
|
+
'name': message,
|
|
434
|
+
'details': details,
|
|
435
|
+
'node_id': this.broker.nodeID
|
|
436
|
+
})
|
|
437
|
+
},
|
|
438
|
+
error: async (message, details)=>{
|
|
439
|
+
return await this.getObject('logs').directInsert({
|
|
440
|
+
'level': 'error',
|
|
441
|
+
'name': message,
|
|
442
|
+
'details': details,
|
|
443
|
+
'node_id': this.broker.nodeID
|
|
444
|
+
})
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
}
|
|
410
448
|
}
|
|
411
|
-
|
|
412
449
|
},
|
|
413
450
|
|
|
414
451
|
/**
|