fix(core): update
This commit is contained in:
parent
540e5be2fa
commit
e451c38f32
23380
package-lock.json
generated
23380
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
20
package.json
20
package.json
@ -13,20 +13,20 @@
|
||||
"format": "(gitzone format)"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.24",
|
||||
"@gitzone/tstest": "^1.0.33",
|
||||
"@pushrocks/qenv": "^4.0.6",
|
||||
"@pushrocks/tapbundle": "^3.2.1",
|
||||
"@gitzone/tsbuild": "^2.1.25",
|
||||
"@gitzone/tstest": "^1.0.54",
|
||||
"@pushrocks/qenv": "^4.0.10",
|
||||
"@pushrocks/tapbundle": "^3.2.14",
|
||||
"@types/node": "^14.0.11",
|
||||
"tslint": "^6.1.2",
|
||||
"tslint": "^6.1.3",
|
||||
"tslint-config-prettier": "^1.18.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@pushrocks/lik": "^4.0.13",
|
||||
"@pushrocks/smartlog-interfaces": "^2.0.15",
|
||||
"@pushrocks/smartrequest": "^1.1.47",
|
||||
"@pushrocks/smartstring": "^3.0.18",
|
||||
"@pushrocks/taskbuffer": "^2.1.1"
|
||||
"@pushrocks/lik": "^4.0.20",
|
||||
"@pushrocks/smartlog-interfaces": "^2.0.22",
|
||||
"@pushrocks/smartrequest": "^1.1.52",
|
||||
"@pushrocks/smartstring": "^3.0.24",
|
||||
"@pushrocks/taskbuffer": "^2.1.13"
|
||||
},
|
||||
"files": [
|
||||
"ts/**/*",
|
||||
|
@ -41,8 +41,9 @@ export class LogAggregator {
|
||||
private async sendAggregatedLogs(logCandidate: ILogCandidate) {
|
||||
this.logObjectMap.remove(logCandidate);
|
||||
// lets post the message to logdna
|
||||
const url = `${this.baseUrl}${logCandidate.urlIdentifier}&now=${Date.now()}`;
|
||||
const response = await plugins.smartrequest.postJson(
|
||||
`${this.baseUrl}${logCandidate.urlIdentifier}&now=${Date.now()}`,
|
||||
url,
|
||||
{
|
||||
headers: {
|
||||
Authorization: this.createBasicAuth(),
|
||||
|
@ -31,11 +31,16 @@ export class LogdnaAccount {
|
||||
const uriIp = euc(lm.options.ip);
|
||||
const uriTags = euc(
|
||||
(() => {
|
||||
let first = true;
|
||||
return lm.options.tags.reduce((reduced, newItem) => {
|
||||
return `${reduced},${newItem}`;
|
||||
if (first) {
|
||||
first = false;
|
||||
reduced = euc(reduced);
|
||||
}
|
||||
return `${reduced},euc(${newItem})`;
|
||||
});
|
||||
})()
|
||||
);
|
||||
)
|
||||
|
||||
// let construct the request uri
|
||||
const requestUrlWithParams = `?hostname=${uriHostname}&mac=${uriMac}&ip=1${uriIp}&tags=${uriTags}`;
|
||||
@ -64,7 +69,7 @@ export class LogdnaAccount {
|
||||
*/
|
||||
public get smartlogDestination(): ILogDestination {
|
||||
return {
|
||||
handleLog: logPackageArg => {
|
||||
handleLog: async logPackageArg => {
|
||||
this.sendSmartlogPackage(logPackageArg);
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user