Forum Discussion

shantlk's avatar
shantlk
Contributor
7 years ago

Generating SumoLogic friendly Text log file (or informative XML files)

Hi,

We are planning to automate our test runs and reporting.

We will be running our test in commandline and exporting the logs.

We will be using SumoLogic to display all our logs.

SumoLogic needs the logs to be in.log format. (or XML)

I have used to /ErrorLog:"C:\ErrorLogs\ProjErrors.log" command to generate an error file whenever there is any error.

However, Sumologic is unable to read this log file as it does not contain timestamp.

Appreciate if someone can help me how to get timestamp on the errorlog.

Also if I can generate any other error file(.log or .xml format) which would be able to give a proper informative log in the SumoLogic dashboard, that would be great !

 

Thanks a lot in advance

    • shantlk's avatar
      shantlk
      Contributor

      Hi Robert,

      Thank you for your suggession. But I have already tried that. I faced following issues with that.

      1) The generated XML files does not contain valueable information such as errors.

      2) Even if I give a different log file name, it does not add the logs of the next run to the same folder. ( I need all the logs to be saved in the specified folder after each run)

      3) The XML file does not contain timestamp (SumoLogic requires timestamp to display the details properly in dashboard)

       

      Appreciate if an alternate method can be suggested.

      Thank you

       

      • baxatob's avatar
        baxatob
        Community Hero

        Hi,

         

        The standard TestComplete log file contains datestamp, but in Unix (Epoch) format. So you should perform some conversions to use it for your needs. 

         

        Anyway your requirement looks like rather complex task to the moment. You need a script, which will find a proper xml data among all log files, parse data, make all required conversions, make correct structure etc...