-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Usar logger utilizado en el componente api
- Loading branch information
Showing
8 changed files
with
105 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
'use strict' | ||
|
||
const config = require('./config') | ||
const eventListener = require('./event-listener') | ||
const { logger } = require("./utils/logger"); | ||
|
||
console.log('Initializing event monitor...') | ||
logger.info('Initializing event monitor...') | ||
|
||
try { | ||
eventListener.initializeEventMonitor() | ||
} catch(error) { | ||
console.log('ERROR: Error al inicializar el monitor de eventos...') | ||
console.log(error) | ||
logger.error('ERROR: Error al inicializar el monitor de eventos...') | ||
logger.error(error) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,14 +4,15 @@ | |
"description": "Servicio de notificación de eventos de blockchain del proyecto SPC19", | ||
"main": "index.js", | ||
"scripts": { | ||
"start": "node index.js", | ||
"start": "node index.js | pino-pretty -c -t", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "Benito Cuesta <[email protected]>", | ||
"license": "UNLICENSED", | ||
"dependencies": { | ||
"abi-decoder": "^2.4.0", | ||
"nodemailer": "^4.6.8", | ||
"pino": "^6.11.3", | ||
"web3": "^1.2.6", | ||
"web3-eea": "^0.10.0" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const pino = require("pino"); | ||
const logger = pino({ | ||
enabled: process.env.NODE_ENV !== "test", | ||
}); | ||
|
||
module.exports = { logger }; |