Skip to main content
5-Regular Member
June 15, 2016
Question

How to read ".log" file in thingworx

  • June 15, 2016
  • 1 reply
  • 4318 views

I have ".log" file on server and want to read that file and take that data into grid.

Did someone already worked on reading ".log"file in ThingWorx?

I came across "CSV" parser extension which can be used to read .xls and .csv files.but I am not sure about "log" file.

Any help is appreciated.

Regards,

Mahesh

1 reply

1-Visitor
June 15, 2016

It depends on the format of the Log file content, log extension in itself isn't a problem.

mlohokare5-Regular MemberAuthor
5-Regular Member
June 15, 2016

Hi Carles,

The log file which I am working on is having spaces and a tab in it instead of ", {comma}, which might not work with CSV parser.

Below is the sample content,

Mon Jun 13 15:10:52 2016 [7548] [DEBUG  ]configuration doc opened OK.
Mon Jun 13 15:10:52 2016 [7548] [DEBUG  ]handling req_id={Foo}
Mon Jun 13 15:10:52 2016 [7548] [DEBUG  ]matches_found={1}
Mon Jun 13 15:10:52 2016 [7548] [DEBUG  ]got content OK

Please suggest.

1-Visitor
June 15, 2016

There's a Code Snippet to read raw TXT files, you may try with it and split lines.

Also you may try to pass the "tab" char as the CSV field separator.