You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I tried connecting my app to Logstash & ES with winston and winston-elasticsearch, but for some reason, there's only one logger.log function that writes to Logstash, from main.js, while all other logger.log don't get logged (from main.js and from other modules).
This is my main.js, which has several logger.log functions:
const logger = require("./config/logger")
async function treatFiles() {
try {
let zipFilesPaths = await findZipFiles()
let zipExtract = await extractZipFiles(zipFilesPaths)
if (zipExtract.length > 0) {
zipExtract.map(async elem => {
let fileParsing = await parseXML(elem)
let zipFileRenaming = await convertToPDX(fileParsing)
await sendFTP(zipFileRenaming)
return elem
})
return
} else {
logger.log("info", `No files to transfer`, { label: path.basename(__filename)})
}
return
} catch (err) {
... error handling
}
}
cron.schedule('* * * * *', () => {
logger.log("debug", `Running a task every minute`, { label: path.basename(__filename)})
treatFiles()
}, { start: true })
The logger at the bottom, 'Running a task every minute' gets logged to Logstash and ES as expected, but the logger for 'No files to transfer' doesn't get logged at all, and logger.log functions from other modules in the project don't get logged too.
All the logs are written into a file as well successfully, but not into Logstash.
Can you please help? I've been trying to work on it for days now.
Thanks!
The text was updated successfully, but these errors were encountered:
Hi,
I tried connecting my app to Logstash & ES with winston and winston-elasticsearch, but for some reason, there's only one logger.log function that writes to Logstash, from main.js, while all other logger.log don't get logged (from main.js and from other modules).
This is my logger.js module:
This is my main.js, which has several logger.log functions:
The logger at the bottom, 'Running a task every minute' gets logged to Logstash and ES as expected, but the logger for 'No files to transfer' doesn't get logged at all, and logger.log functions from other modules in the project don't get logged too.
All the logs are written into a file as well successfully, but not into Logstash.
Can you please help? I've been trying to work on it for days now.
Thanks!
The text was updated successfully, but these errors were encountered: