From 9f81cdfb8a105b479fd6a7a4c3ba6b0c6187410c Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Fri, 5 Jun 2020 09:25:28 +0000 Subject: [PATCH] fix(core): update --- package-lock.json | 11 ++++++++--- package.json | 3 ++- ts/smartlog.classes.smartlog.ts | 15 +++++++++++---- ts/smartlog.plugins.ts | 3 ++- 4 files changed, 23 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1fe2772..751d60b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1120,6 +1120,11 @@ } } }, + "@pushrocks/isounique": { + "version": "1.0.4", + "resolved": "https://verdaccio.lossless.one/@pushrocks%2fisounique/-/isounique-1.0.4.tgz", + "integrity": "sha512-P1xLsuA1+8LQpoWCo2nP2vIQXKGUl5wDWU6CD7xTDZc3uw0He5V/qCPHM5zpIZsS7IuZOxDDpWb7aFveB11tXw==" + }, "@pushrocks/lik": { "version": "4.0.13", "resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-4.0.13.tgz", @@ -1289,9 +1294,9 @@ } }, "@pushrocks/smartlog-interfaces": { - "version": "2.0.12", - "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartlog-interfaces/-/smartlog-interfaces-2.0.12.tgz", - "integrity": "sha512-Dfaran6LPAgkfBXgXrveYvpu5oN9gCvq9629XI/ThLV8POkGPQgxF4nw6hC1MIWzxmA/DaVABcTGhNKiv8bQhw==", + "version": "2.0.15", + "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartlog-interfaces/-/smartlog-interfaces-2.0.15.tgz", + "integrity": "sha512-C9AQGs0QI2xmcIbb2A32rg1rebHavpXGJ1LXBSLpSvctyrBppxWjut7kihgU5nqxYYw+Cr+wl5DA1pSIPQ1R0w==", "requires": { "@apiglobal/typedrequest-interfaces": "^1.0.13" } diff --git a/package.json b/package.json index 80d9f90..fcdd5ee 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,8 @@ "tslint-config-prettier": "^1.18.0" }, "dependencies": { - "@pushrocks/smartlog-interfaces": "^2.0.12" + "@pushrocks/isounique": "^1.0.4", + "@pushrocks/smartlog-interfaces": "^2.0.15" }, "files": [ "ts/**/*", diff --git a/ts/smartlog.classes.smartlog.ts b/ts/smartlog.classes.smartlog.ts index f25e82a..0811560 100644 --- a/ts/smartlog.classes.smartlog.ts +++ b/ts/smartlog.classes.smartlog.ts @@ -61,12 +61,16 @@ export class Smartlog implements plugins.smartlogInterfaces.ILogDestination { * @param logLevelArg - the log level * @param logMessageArg - the log message * @param logDataArg - any additional log data + * @param correlationArg - info about corrleations */ public log( logLevelArg: plugins.smartlogInterfaces.TLogLevel, logMessageArg: string, logDataArg?: any, - logCorrelationIdArg: string = '123' + correlationArg: plugins.smartlogInterfaces.ILogCorrelation = { + id: plugins.isounique.uni(), + type: 'none' + } ) { if (this.consoleEnabled) { this.safeConsoleLog( @@ -78,7 +82,7 @@ export class Smartlog implements plugins.smartlogInterfaces.ILogDestination { type: 'log', context: this.logContext, level: logLevelArg, - correlationId: logCorrelationIdArg, + correlation: correlationArg, message: logMessageArg }; if (logDataArg) { @@ -91,7 +95,10 @@ export class Smartlog implements plugins.smartlogInterfaces.ILogDestination { logLevelArg: plugins.smartlogInterfaces.TLogLevel, logMessageArg: string, logDataArg?: any, - logCorrelationIdArg: string = '123' + correlationArg: plugins.smartlogInterfaces.ILogCorrelation = { + id: plugins.isounique.uni(), + type: 'none' + } ) { if (this.consoleEnabled) { this.safeConsoleLog(`INCREMENT: ${logLevelArg}: ${logMessageArg}`); @@ -102,7 +109,7 @@ export class Smartlog implements plugins.smartlogInterfaces.ILogDestination { context: this.logContext, level: logLevelArg, message: logMessageArg, - correlationId: logCorrelationIdArg + correlation: correlationArg }); } diff --git a/ts/smartlog.plugins.ts b/ts/smartlog.plugins.ts index 81be71d..b884f32 100644 --- a/ts/smartlog.plugins.ts +++ b/ts/smartlog.plugins.ts @@ -1,3 +1,4 @@ +import * as isounique from '@pushrocks/isounique'; import * as smartlogInterfaces from '@pushrocks/smartlog-interfaces'; -export { smartlogInterfaces }; +export { isounique, smartlogInterfaces };