From 44e856d376ebafe8fc784188ab9e4fcd1324a0e8 Mon Sep 17 00:00:00 2001 From: Nicolas Dupont Date: Wed, 20 Nov 2024 11:57:50 +0100 Subject: [PATCH 1/2] Fix timestamp prefix format in logs --- scripts/dataset/logger/index.js | 2 +- src/collection-api/logger.js | 2 +- src/logger/index.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/dataset/logger/index.js b/scripts/dataset/logger/index.js index 4c2389ec..802eb7cb 100644 --- a/scripts/dataset/logger/index.js +++ b/scripts/dataset/logger/index.js @@ -7,7 +7,7 @@ const { combine, timestamp, printf, colorize } = winston.format; logger.format = combine( colorize(), - timestamp({ format: 'YYYY-MM-DDTHH:MM:SSZ' }), + timestamp({ format: 'YYYY-MM-DDTHH:mm:ssZ' }), printf(({ level, message, counter, hash, timestamp }) => { const prefix = counter && hash ? `${counter.toString().padEnd(6)} ${hash.padEnd(40)}` : ''; diff --git a/src/collection-api/logger.js b/src/collection-api/logger.js index c1287dbd..8a1d74f3 100644 --- a/src/collection-api/logger.js +++ b/src/collection-api/logger.js @@ -30,7 +30,7 @@ if (config.get('@opentermsarchive/engine.logger.sendMailOnError')) { const logger = winston.createLogger({ format: combine( colorize(), - timestamp({ format: 'YYYY-MM-DDTHH:MM:SSZ' }), + timestamp({ format: 'YYYY-MM-DDTHH:mm:ssZ' }), printf(({ level, message, timestamp }) => { const timestampPrefix = config.get('@opentermsarchive/engine.logger.timestampPrefix') ? `${timestamp} ` : ''; diff --git a/src/logger/index.js b/src/logger/index.js index ea94f489..4a0f2aa1 100644 --- a/src/logger/index.js +++ b/src/logger/index.js @@ -8,7 +8,7 @@ const { combine, timestamp, printf, colorize } = winston.format; const alignedWithColorsAndTime = combine( colorize(), - timestamp({ format: 'YYYY-MM-DDTHH:MM:SSZ' }), + timestamp({ format: 'YYYY-MM-DDTHH:mm:ssZ' }), printf(({ level, message, timestamp, serviceId, termsType, documentId }) => { const servicePrefix = serviceId && termsType ? `${serviceId} — ${termsType}${documentId ? `:${documentId}` : ''}` From d154140c0845178f9dd8f4970b9a52d89f9daa41 Mon Sep 17 00:00:00 2001 From: Nicolas Dupont Date: Wed, 20 Nov 2024 11:58:26 +0100 Subject: [PATCH 2/2] Add changelog entry --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2efc1f06..fa43d355 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ All changes that impact users of this module are documented in this file, in the [Common Changelog](https://common-changelog.org) format with some additional specifications defined in the CONTRIBUTING file. This codebase adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased [patch] + +> Development of this release was supported by the [French Ministry for Foreign Affairs](https://www.diplomatie.gouv.fr/fr/politique-etrangere-de-la-france/diplomatie-numerique/) through its ministerial [State Startups incubator](https://beta.gouv.fr/startups/open-terms-archive.html) under the aegis of the Ambassador for Digital Affairs. + +### Fixed + +- Fix timestamp prefix format in logs + ## 2.7.0 - 2024-11-20 _Full changeset and discussions: [#1118](https://github.com/OpenTermsArchive/engine/pull/1118)._