From: Jérôme Benoit Date: Mon, 31 May 2021 21:07:12 +0000 (+0200) Subject: Refine some logs level. X-Git-Tag: v1.0.11~3 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=9fbc92f7bbead3a303a2a5718d65b0ffd545e24d;p=e-mobility-charging-stations-simulator.git Refine some logs level. Signed-off-by: Jérôme Benoit --- diff --git a/docker/Dockerfile b/docker/Dockerfile index 8884e89e..46ca0102 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -8,7 +8,6 @@ RUN npm set progress=false && npm config set depth 0 && npm cache clean --force RUN npm install COPY tsconfig.json rollup.config.js ./ COPY src ./src -COPY src/assets/authorization-tags-template.json ./src/assets/authorization-tags.json COPY docker/config.json ./src/assets/config.json RUN npm run build diff --git a/package-lock.json b/package-lock.json index 570e1ed8..1ffc0ca5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1891,21 +1891,30 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "4.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.25.0.tgz", - "integrity": "sha512-Qfs3dWkTMKkKwt78xp2O/KZQB8MPS1UQ5D3YW2s6LQWBE1074BE+Rym+b1pXZIX3M3fSvPUDaCvZLKV2ylVYYQ==", + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.26.0.tgz", + "integrity": "sha512-yA7IWp+5Qqf+TLbd8b35ySFOFzUfL7i+4If50EqvjT6w35X8Lv0eBHb6rATeWmucks37w+zV+tWnOXI9JlG6Eg==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "4.25.0", - "@typescript-eslint/scope-manager": "4.25.0", - "debug": "^4.1.1", + "@typescript-eslint/experimental-utils": "4.26.0", + "@typescript-eslint/scope-manager": "4.26.0", + "debug": "^4.3.1", "functional-red-black-tree": "^1.0.1", - "lodash": "^4.17.15", - "regexpp": "^3.0.0", - "semver": "^7.3.2", - "tsutils": "^3.17.1" + "lodash": "^4.17.21", + "regexpp": "^3.1.0", + "semver": "^7.3.5", + "tsutils": "^3.21.0" }, "dependencies": { + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -1915,6 +1924,12 @@ "yallist": "^4.0.0" } }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "semver": { "version": "7.3.5", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", @@ -1933,60 +1948,88 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "4.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.25.0.tgz", - "integrity": "sha512-f0doRE76vq7NEEU0tw+ajv6CrmPelw5wLoaghEHkA2dNLFb3T/zJQqGPQ0OYt5XlZaS13MtnN+GTPCuUVg338w==", + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.26.0.tgz", + "integrity": "sha512-TH2FO2rdDm7AWfAVRB5RSlbUhWxGVuxPNzGT7W65zVfl8H/WeXTk1e69IrcEVsBslrQSTDKQSaJD89hwKrhdkw==", "dev": true, "requires": { - "@types/json-schema": "^7.0.3", - "@typescript-eslint/scope-manager": "4.25.0", - "@typescript-eslint/types": "4.25.0", - "@typescript-eslint/typescript-estree": "4.25.0", - "eslint-scope": "^5.0.0", - "eslint-utils": "^2.0.0" + "@types/json-schema": "^7.0.7", + "@typescript-eslint/scope-manager": "4.26.0", + "@typescript-eslint/types": "4.26.0", + "@typescript-eslint/typescript-estree": "4.26.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + }, + "dependencies": { + "eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^2.0.0" + } + } } }, "@typescript-eslint/parser": { - "version": "4.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.25.0.tgz", - "integrity": "sha512-OZFa1SKyEJpAhDx8FcbWyX+vLwh7OEtzoo2iQaeWwxucyfbi0mT4DijbOSsTgPKzGHr6GrF2V5p/CEpUH/VBxg==", + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.26.0.tgz", + "integrity": "sha512-b4jekVJG9FfmjUfmM4VoOItQhPlnt6MPOBUL0AQbiTmm+SSpSdhHYlwayOm4IW9KLI/4/cRKtQCmDl1oE2OlPg==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "4.25.0", - "@typescript-eslint/types": "4.25.0", - "@typescript-eslint/typescript-estree": "4.25.0", - "debug": "^4.1.1" + "@typescript-eslint/scope-manager": "4.26.0", + "@typescript-eslint/types": "4.26.0", + "@typescript-eslint/typescript-estree": "4.26.0", + "debug": "^4.3.1" + }, + "dependencies": { + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } } }, "@typescript-eslint/scope-manager": { - "version": "4.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.25.0.tgz", - "integrity": "sha512-2NElKxMb/0rya+NJG1U71BuNnp1TBd1JgzYsldsdA83h/20Tvnf/HrwhiSlNmuq6Vqa0EzidsvkTArwoq+tH6w==", + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.26.0.tgz", + "integrity": "sha512-G6xB6mMo4xVxwMt5lEsNTz3x4qGDt0NSGmTBNBPJxNsrTXJSm21c6raeYroS2OwQsOyIXqKZv266L/Gln1BWqg==", "dev": true, "requires": { - "@typescript-eslint/types": "4.25.0", - "@typescript-eslint/visitor-keys": "4.25.0" + "@typescript-eslint/types": "4.26.0", + "@typescript-eslint/visitor-keys": "4.26.0" } }, "@typescript-eslint/types": { - "version": "4.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.25.0.tgz", - "integrity": "sha512-+CNINNvl00OkW6wEsi32wU5MhHti2J25TJsJJqgQmJu3B3dYDBcmOxcE5w9cgoM13TrdE/5ND2HoEnBohasxRQ==", + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.26.0.tgz", + "integrity": "sha512-rADNgXl1kS/EKnDr3G+m7fB9yeJNnR9kF7xMiXL6mSIWpr3Wg5MhxyfEXy/IlYthsqwBqHOr22boFbf/u6O88A==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "4.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.25.0.tgz", - "integrity": "sha512-1B8U07TGNAFMxZbSpF6jqiDs1cVGO0izVkf18Q/SPcUAc9LhHxzvSowXDTvkHMWUVuPpagupaW63gB6ahTXVlg==", + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.26.0.tgz", + "integrity": "sha512-GHUgahPcm9GfBuy3TzdsizCcPjKOAauG9xkz9TR8kOdssz2Iz9jRCSQm6+aVFa23d5NcSpo1GdHGSQKe0tlcbg==", "dev": true, "requires": { - "@typescript-eslint/types": "4.25.0", - "@typescript-eslint/visitor-keys": "4.25.0", - "debug": "^4.1.1", - "globby": "^11.0.1", + "@typescript-eslint/types": "4.26.0", + "@typescript-eslint/visitor-keys": "4.26.0", + "debug": "^4.3.1", + "globby": "^11.0.3", "is-glob": "^4.0.1", - "semver": "^7.3.2", - "tsutils": "^3.17.1" + "semver": "^7.3.5", + "tsutils": "^3.21.0" }, "dependencies": { "array-union": { @@ -1995,6 +2038,15 @@ "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true }, + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, "globby": { "version": "11.0.3", "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.3.tgz", @@ -2018,6 +2070,12 @@ "yallist": "^4.0.0" } }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "semver": { "version": "7.3.5", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", @@ -2036,12 +2094,12 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "4.25.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.25.0.tgz", - "integrity": "sha512-AmkqV9dDJVKP/TcZrbf6s6i1zYXt5Hl8qOLrRDTFfRNae4+LB8A4N3i+FLZPW85zIxRy39BgeWOfMS3HoH5ngg==", + "version": "4.26.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.26.0.tgz", + "integrity": "sha512-cw4j8lH38V1ycGBbF+aFiLUls9Z0Bw8QschP3mkth50BbWzgFS33ISIgBzUMuQ2IdahoEv/rXstr8Zhlz4B1Zg==", "dev": true, "requires": { - "@typescript-eslint/types": "4.25.0", + "@typescript-eslint/types": "4.26.0", "eslint-visitor-keys": "^2.0.0" } }, diff --git a/package.json b/package.json index f79444b1..1072c545 100644 --- a/package.json +++ b/package.json @@ -78,8 +78,8 @@ "@types/node": "^14.17.1", "@types/uuid": "^8.3.0", "@types/ws": "^7.4.4", - "@typescript-eslint/eslint-plugin": "^4.25.0", - "@typescript-eslint/parser": "^4.25.0", + "@typescript-eslint/eslint-plugin": "^4.26.0", + "@typescript-eslint/parser": "^4.26.0", "auto-changelog": "^2.3.0", "clinic": "^9.0.0", "cross-env": "^7.0.3", diff --git a/src/utils/FileUtils.ts b/src/utils/FileUtils.ts index 8edbb4c5..c0891e64 100644 --- a/src/utils/FileUtils.ts +++ b/src/utils/FileUtils.ts @@ -5,9 +5,9 @@ export default class FileUtils { const prefix = logPrefix.length !== 0 ? logPrefix + ' ' : ''; if (error.code === 'ENOENT') { if (consoleOut) { - console.error(prefix + fileType + ' file ' + filePath + ' not found: ', error); + console.warn(prefix + fileType + ' file ' + filePath + ' not found: ', error); } else { - logger.error(prefix + fileType + ' file ' + filePath + ' not found: %j', error); + logger.warn(prefix + fileType + ' file ' + filePath + ' not found: %j', error); } } else { if (consoleOut) { diff --git a/src/utils/PerformanceStatistics.ts b/src/utils/PerformanceStatistics.ts index bcd0b71f..0c68fa73 100644 --- a/src/utils/PerformanceStatistics.ts +++ b/src/utils/PerformanceStatistics.ts @@ -59,11 +59,12 @@ export default class PerformanceStatistics { public logPerformance(entry: PerformanceEntry, className: string): void { this.addPerformanceTimer(entry.name as RequestCommand | IncomingRequestCommand, entry.duration); - const perfEntry: PerfEntry = {} as PerfEntry; - perfEntry.name = entry.name; - perfEntry.entryType = entry.entryType; - perfEntry.startTime = entry.startTime; - perfEntry.duration = entry.duration; + const perfEntry: PerfEntry = { + name: entry.name, + entryType: entry.entryType, + startTime: entry.startTime, + duration: entry.duration + } ; logger.info(`${this.logPrefix()} ${className} method(s) entry: %j`, perfEntry); }