diff --git a/package-lock.json b/package-lock.json index 363ab8e..747a08b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "dependencies": { "axios": "^1.6.0", "cookie-session": "^2.1.0", + "diary": "^0.4.5", "express": "^4.19.2", "jose": "^5.2.0", "nodemon": "^3.0.1", @@ -2257,6 +2258,11 @@ "node": ">=8" } }, + "node_modules/diary": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/diary/-/diary-0.4.5.tgz", + "integrity": "sha512-dUtG/AVG5bt9Mi+23TgTvjZ0NDJaszjs1GpYooM5cbEzk2xoqdvxCOlVw0xkenQXZw/DFxp23tj5VkP6YmlRmw==" + }, "node_modules/diff-sequences": { "version": "29.4.3", "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.4.3.tgz", diff --git a/package.json b/package.json index ce2bdf2..99b97c9 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "dependencies": { "axios": "^1.6.0", "cookie-session": "^2.1.0", + "diary": "^0.4.5", "express": "^4.19.2", "jose": "^5.2.0", "nodemon": "^3.0.1", diff --git a/server.js b/server.js index 005669c..c5671e2 100644 --- a/server.js +++ b/server.js @@ -12,6 +12,8 @@ const fabriqueSessionFCPlus = new FabriqueSessionFCPlus({ }); const middleware = new Middleware({ adaptateurChiffrement, adaptateurEnvironnement }); +journal.active(); + const serveur = SiteVitrine.creeServeur({ adaptateurChiffrement, adaptateurEnvironnement, diff --git a/src/adaptateurs/journal.js b/src/adaptateurs/journal.js index 4229127..9c4b3f7 100644 --- a/src/adaptateurs/journal.js +++ b/src/adaptateurs/journal.js @@ -1,5 +1,6 @@ -/* eslint-disable no-console */ -const consigne = console.log; -/* eslint-enable no-console */ +const { enable, info } = require('diary'); -module.exports = { consigne }; +const active = () => enable('*'); +const consigne = info; + +module.exports = { active, consigne };