How To Customize Orchestrator To Send only Error and Fatal Robot logs into the SQL database and all the logs in Elasticsearch

How to send only Error and Fatal Robot logs into the SQL database and all the logs in Elasticsearch?

The following steps will help one configure the Orchestrator to send only error and above level logs to database, while sending all the other logs to Elasticsearch:

1.Stop the IIS by running command “iisreset /stop” after opening command prompt with admin rights.It should be noted that this step will bring down Orchestrator, thus care should be taken that there are no new jobs inside Orchestrator at the moment of doing the below changes.

2.Make below changes in web.config which is placed in the Orchestrator installation folder.Default path is “C:\Program Files (x86)\UiPath\Orchestrator”
 

<logger name="Robot.*" minlevel="Error" writeTo="database", final="false" />  
<logger name="Robot.*" writeTo="robotElasticBuffer" final="true" />  
 
3.Start the IIS by running the command "iisreset /start"

Level of logs can be managed by changing or adding the "minlevel" in the above configuration.The following link contains more reference on the same: https://docs.uipath.com/orchestrator/docs/logging-levels

The "final" parameter confirms if the current rule should be set as the final rule to be validated. This would mean, if any rule contains the final as "true" and satisfies the current log being validated, the next sequential rules in the configuration file will not be validated.