How to get "Log" File from ".log" or ".txt" to ".json"


I am comparatively new to UiPath and was tasked to analyze all the log files.
I can see all the RPA logs are getting created in “.log” or “.txt”. (The same is configured in the NLog file as well.)
Its very difficult to analyze all the “.txt” or “.log” files getting created from RPA activities.
My query is, whether there is way to simplify and store Log file into “.json”.
Can I make any changes in NLog file to get this done or some other way.


Hi @yuva010

May i know your requirements ?

Hi @Sob ,

Requirement is simple, whatever RPA logs are getting generated on daily basis analyze them to see the performance, look for improvements and/or patterns etc…
I have been thinking of presenting the same in Kibana dashboards.
But to do so, I first need Logs to be stored in .json format so the above query on how to get log files from .Log/.txt to .Json.

The NLog library offers many options of formatting and targets for logs, including JSON. You can configure those in the NLog.config file inside UiPath installation folder.

Also, if you’re using Orchestrator, then you can configure it to send logs directly to Elasticsearch and visualize them in Kibana.


Thanks @Mateus_Cruz I was able to create .json log from UiPath with above details.
However to upload the json log into ElasticSearch it requires “Action_metadata” before each json object line.
I was not able to add this action metadata before each line
ex. {“index”:{"_index":“XXXXXX”,"_type":“act”,"_id":0}} where _id is incremental.

Do we have to make any changes in Config file to get this Action_metadata added before each json object line?

Thanks in Advance.

If you need to make many changes to get the right format for Elasticsearch, it might be easier to use the Elasticsearch custom target that already does that.

1 Like

UiPath Dashboard for Kibana analyzes log files whether in JSON or NLog format. It is open source so you can fork it and adapt to your needs, or take a look at the code to see how it’s done.