Robotlogs via NLog to Database: No debugfile and no data transferred

Hello Together,

could you please help me with the following script.

We expected to get a debug file for Nlog transmission by adding:

  • internalLogLevel=“Debug” internalLogFile=“FOLDER\NLOG_DEBUG.log”

And we expected to get the log-data in our database after creating log messages.

Any ideas? Thank you!

<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" internalLogLevel="Debug" internalLogFile="FOLDER\NLOG_DEBUG.log">

  <variable name="WorkflowLoggingDirectory" value="${specialfolder:folder=LocalApplicationData}/UiPath/Logs"/>
  
<rules>
	<logger name="WorkflowLogging" writeTo="database" final="true" />
  </rules>

  <targets>
   	<target name="database" xsi:type="Database">
    <connectionString>
    server=SERVERNAME;
    Database=staging;
    user id=NAME;
    password=*******
  </connectionString>
  <commandText>
    insert into nlog.uipath_robotLog (machineName) values (@machineName);
	
  </commandText>

  <parameter name="@machineName" layout="${machineName}" />


	</target>
  </targets>
</nlog>

After having tested it we noticed that an extension is required, which is missing at the moment.
We will contact the UiPath Support to find a solution.

Hi @PeCour,

Not exactly an answer to your query.

We also create a NLog file but the use case is to let the Splunl Forwarder use it.

You can refer how we used the targets and rules to achieve this in this post

1 Like

After having spoken to an expert from UiPath, we did not find a solution.
Probably Nlog database is not supported.

Therefore, we are now working with a work around by formatting the log files and bulk update them into the SQL server.

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