From 1c59952bb55fae756bb9ad4400e793e1591e5a5d Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Fri, 5 Jun 2020 09:35:42 +0000 Subject: [PATCH] fix(core): update --- package-lock.json | 16 +++++++------- package.json | 2 +- test/test.ts | 5 ++++- ts/sl.destlocal.classes.destinationlocal.ts | 24 +++++++++++---------- 4 files changed, 26 insertions(+), 21 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5892192..8730125 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1304,9 +1304,9 @@ } }, "@pushrocks/smartlog-interfaces": { - "version": "2.0.13", - "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartlog-interfaces/-/smartlog-interfaces-2.0.13.tgz", - "integrity": "sha512-4zf6r41uTaQDhhu5ej7IAWFzp9bCp2BCwNgROqLxov+2k44h2MGMwPkUe7eIGCB2hfC7mbdXBXqALOuuNzdPcg==", + "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" } @@ -3024,7 +3024,7 @@ }, "has-flag": { "version": "3.0.0", - "resolved": "https://verdaccio.lossless.one/has-flag/-/has-flag-3.0.0.tgz", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, @@ -3286,7 +3286,7 @@ }, "isexe": { "version": "2.0.0", - "resolved": "https://verdaccio.lossless.one/isexe/-/isexe-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, @@ -3768,7 +3768,7 @@ }, "path-parse": { "version": "1.0.6", - "resolved": "https://verdaccio.lossless.one/path-parse/-/path-parse-1.0.6.tgz", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", "dev": true }, @@ -4388,7 +4388,7 @@ }, "source-map": { "version": "0.6.1", - "resolved": "https://verdaccio.lossless.one/source-map/-/source-map-0.6.1.tgz", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true }, @@ -4608,7 +4608,7 @@ }, "tsutils": { "version": "2.29.0", - "resolved": "https://verdaccio.lossless.one/tsutils/-/tsutils-2.29.0.tgz", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", "dev": true, "requires": { diff --git a/package.json b/package.json index 26340b3..8a5a1ad 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "homepage": "https://gitlab.com/pushrocks/beautylog", "dependencies": { "@pushrocks/consolecolor": "^2.0.1", - "@pushrocks/smartlog-interfaces": "^2.0.13", + "@pushrocks/smartlog-interfaces": "^2.0.15", "@pushrocks/smartpromise": "^3.0.6" }, "devDependencies": { diff --git a/test/test.ts b/test/test.ts index 569c300..a93af08 100644 --- a/test/test.ts +++ b/test/test.ts @@ -26,7 +26,10 @@ tap.test('.log(message) should print a blue Dir message', async () => { level: 'info', context: testLogContext, message: 'this is a info log message', - correlationId: '123' + correlation: { + id: '123', + type: 'none' + } }); }); diff --git a/ts/sl.destlocal.classes.destinationlocal.ts b/ts/sl.destlocal.classes.destinationlocal.ts index b4c5391..b7c2b13 100644 --- a/ts/sl.destlocal.classes.destinationlocal.ts +++ b/ts/sl.destlocal.classes.destinationlocal.ts @@ -5,7 +5,6 @@ import { ILogDestination, ILogPackage, TLogLevel } from '@pushrocks/smartlog-int import { TColorName } from '@pushrocks/consolecolor'; export class DestinationLocal implements ILogDestination { - /** * handles a log according to the smartlog standard * @param logPackage @@ -47,10 +46,13 @@ export class DestinationLocal implements ILogDestination { containerName: 'undefined', environment: 'test', runtime: 'node', - zone: 'undefined' + zone: 'undefined', }, message: logTextArg, - correlationId: 'n/a' + correlation: { + id: 'none', + type: 'none', + }, }); } } @@ -85,49 +87,49 @@ export class DestinationLocal implements ILogDestination { } = { silly: { prefix: plugins.consolecolor.coloredString(' silly ', 'white', 'blue') + ' ', - textColor: 'blue' + textColor: 'blue', }, error: { prefix: plugins.consolecolor.coloredString(' ', 'red', 'red') + plugins.consolecolor.coloredString(' ERROR! ', 'red', 'black') + ' ', - textColor: 'red' + textColor: 'red', }, info: { prefix: plugins.consolecolor.coloredString(' ', 'blue', 'blue') + plugins.consolecolor.coloredString(' info: ', 'blue', 'black') + ' ', - textColor: 'white' + textColor: 'white', }, note: { prefix: plugins.consolecolor.coloredString(' ', 'pink', 'pink') + plugins.consolecolor.coloredString(' note -> ', 'pink', 'black') + ' ', - textColor: 'pink' + textColor: 'pink', }, ok: { prefix: plugins.consolecolor.coloredString(' ', 'green', 'green') + plugins.consolecolor.coloredString(' ok ', 'green', 'black') + ' ', - textColor: 'green' + textColor: 'green', }, success: { prefix: plugins.consolecolor.coloredString(' ', 'green', 'green') + plugins.consolecolor.coloredString(' SUCCESS! ', 'green', 'black') + ' ', - textColor: 'green' + textColor: 'green', }, warn: { prefix: plugins.consolecolor.coloredString(' ', 'orange', 'orange') + plugins.consolecolor.coloredString(' WARN -> ', 'orange', 'black') + ' ', - textColor: 'orange' - } + textColor: 'orange', + }, }; }