Move logs from Orchestrator into database/storage bucket

Hello,

How can i save the logs of each transaction item from orchestrator into database/ storage bucket of orchestrator?

Logs are stored in the Orchestrator db in the Logs table.

I agree with you but how long will it be stored in orchestrator? Is it for lifetime?

They aren’t “stored in Orchestrator.” They’re stored in the database Logs table. The Logs page in Orchestrator gets them from the database and shows them to you. So they’ll be visible in Orchestrator as long as they are in the database.

Hi @Raviteja_N,

As @postwick said, robot logs are not deleted automatically unless you delete them (for Onpremises orchestrator), for cloud orchestrator UiPath has a retention policy on robot logs for 30 days, after which UiPath deletes them to save on storage cost (I assume).

On a Onpremises orchestrator you should consider what your end goal is. Is it to archive logs as to satisfy a regulation or for visualizing the data etc.


You can get all your RobotLogs given a time filter using API call to your Orchestrator (cloud or onpremises)

A PowerShell snippet for a onpremises endpoint

$LogsEndpoint = "/odata/RobotLogs?&`$filter=RobotName eq '$RobotName' and TimeStamp gt $TimePast"

Later you will have to parse the response and get the required field values and send it to your database (which you also need to setup before hand).

This is possible, but you will have to ask yourself, is it worth the time? and will you need to make your code generic as to allow for easy porting to the next process.

1 Like

In addition to @jeevith. If this is an on-going need, consider adjusting your NLog to include additional format and targets needed and redirect the logs to where you want them stored. (If you do a quick search for NLog and my username, you’ll find some references mostly about Splunk and Cloudwatch, but also links to NLog documentation).

If you do any work with PowerShell, consider using the UiPath.Powershell Powershell module. Information can be found on Github. It does have some limits when it comes to some of the more recent features as development hasn’t been as active recently, but I imagine it has everything you need for the logs.

Thanks all for your time. I’m able to extract the logs using orchestrator API and able to store them in SQL Server database…
Also this is not ongoing need in my project, but to know how things can be handled.
Thanks again for your suggestions…

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.