This results in the following log:
.....
{"jsFile":"parseScriptLogs.js","level":"info","message":"81 files to process","timestamp":"2017-11-28T10:13:39.822Z"}
...
some errors occur after parsing?? (but seem to be ok) (bug 1)
.....
{"jsFile":"parseScriptLogs.js","level":"info","message":"Finishing parsing 04666bd9-7bc8-42fb-97b5-dc3cb0fd7579.2017_10_30_09_00_40.78819A4E856F6AB8D589.log","timestamp":"2017-11-28T10:13:42.994Z"}
{"jsFile":"parseScriptLogs.js","level":"error","message":"An error occured parsing 04666bd9-7bc8-42fb-97b5-dc3cb0fd7579.2017_10_30_09_00_40.78819A4E856F6AB8D589.log","timestamp":"2017-11-28T10:13:42.994Z"}
....
other files can not be parsed at all and result in immediate error (see my extra debug logMessage (bug 2)
....
{"jsFile":"parseScriptLogs.js","level":"info","message":"Processing file number 1: 069c6e82-b779-424c-9d9b-6aaa1ddd587f.2017_10_28_01_54_16.BEDE257E37C1ED0479FC.log","timestamp":"2017-11-28T10:13:43.260Z"}
{"jsFile":"parseScriptLogs.js","level":"info","message":"begin parsing 069c6e82-b779-424c-9d9b-6aaa1ddd587f.2017_10_28_01_54_16.BEDE257E37C1ED0479FC.log","timestamp":"2017-11-28T10:13:43.260Z"}
{"jsFile":"parseScriptLogs.js","level":"error","message":"what happened here?","timestamp":"2017-11-28T10:13:43.401Z"}
{"jsFile":"parseScriptLogs.js","level":"error","message":"Error parsing 069c6e82-b779-424c-9d9b-6aaa1ddd587f.2017_10_28_01_54_16.BEDE257E37C1ED0479FC.log","timestamp":"2017-11-28T10:13:43.401Z"}
Prerequisites
Description
ParseScriptLogs is giving errors on some files
Steps to Reproduce
Expected behavior: Expect all Sense apps to output XML files
Actual behavior: Some Apps do not produce XML output
Reproduces how often: 100 %. Also when duplicating same app, that app also fails.
Versions
Agent: 1.0.1.0 OS: Windows server 2012 R2 standard
Additional Information
to catch the problem I have put an extra debug line to output to the logfile here: agent/lib/parseScriptLogs.js
-->>> function parseQlikLogFile(parser, file) {
} <<---
This results in the following log: ..... {"jsFile":"parseScriptLogs.js","level":"info","message":"81 files to process","timestamp":"2017-11-28T10:13:39.822Z"} ... some errors occur after parsing?? (but seem to be ok) (bug 1) ..... {"jsFile":"parseScriptLogs.js","level":"info","message":"Finishing parsing 04666bd9-7bc8-42fb-97b5-dc3cb0fd7579.2017_10_30_09_00_40.78819A4E856F6AB8D589.log","timestamp":"2017-11-28T10:13:42.994Z"} {"jsFile":"parseScriptLogs.js","level":"error","message":"An error occured parsing 04666bd9-7bc8-42fb-97b5-dc3cb0fd7579.2017_10_30_09_00_40.78819A4E856F6AB8D589.log","timestamp":"2017-11-28T10:13:42.994Z"} .... other files can not be parsed at all and result in immediate error (see my extra debug logMessage (bug 2) .... {"jsFile":"parseScriptLogs.js","level":"info","message":"Processing file number 1: 069c6e82-b779-424c-9d9b-6aaa1ddd587f.2017_10_28_01_54_16.BEDE257E37C1ED0479FC.log","timestamp":"2017-11-28T10:13:43.260Z"} {"jsFile":"parseScriptLogs.js","level":"info","message":"begin parsing 069c6e82-b779-424c-9d9b-6aaa1ddd587f.2017_10_28_01_54_16.BEDE257E37C1ED0479FC.log","timestamp":"2017-11-28T10:13:43.260Z"} {"jsFile":"parseScriptLogs.js","level":"error","message":"what happened here?","timestamp":"2017-11-28T10:13:43.401Z"} {"jsFile":"parseScriptLogs.js","level":"error","message":"Error parsing 069c6e82-b779-424c-9d9b-6aaa1ddd587f.2017_10_28_01_54_16.BEDE257E37C1ED0479FC.log","timestamp":"2017-11-28T10:13:43.401Z"}