Extract data from file

0
Hi , below there is file which contains some failed messages. I want to extract and display those failed messages in list view. Do anyone have any idea?   Example file-  <![LOG[Set a local default variable SMSTSDisableWow64Redirection]LOG]!><time="09:27:14.221-60" date="11-12-2020" component="TSManager" context="" type="0" thread="2920" file="executionenv.cxx:627"> <![LOG[CreateProcess failed. Code(0x80070002)]LOG]!><time="09:27:17.893-60" date="11-12-2020" component="InstallSoftware" context="" type="3" thread="3148" file="CommandLine.cpp:1030"> <![LOG[Failed to execute command line]LOG]!><time="09:27:17.893-60" date="11-12-2020" component="InstallSoftware" context="" type="3" thread="3148" file="runcommandline.cpp:465"> <![LOG[Install Software failed to run command line, hr=0x80070002]LOG]!><time="09:27:17.893-60" date="11-12-2020" component="InstallSoftware" context="" type="3" thread="3148" file="main.cpp:395"> <![LOG[Failed to run the action: REM SoftwareDistribution. Error -2147024894]LOG]!><time="09:27:17.893-60" date="11-12-2020" component="TSManager" context="" type="3" thread="2920" file="instruction.cxx:915">   Output should be displayed in a list like this - [Failed to execute command line] [Failed to run the action: REM SoftwareDistribution. Error -2147024894]
asked
1 answers
0

Import the file to the app.

Use the StringFromFile form the community commons module see https://docs.mendix.com/appstore/modules/community-commons-function-library#4-function-list

Now you have the data as a string and can parse the data with find and substring functions searching for what you need from the string and create records for this.

Alertnatively build the parser in java and provide the file as input to the parser.

answered