Abonnieren

UiPath Robot

Anleitung für UiPath Robot

Roboter-Protokolle

About

Logs are time-stamped files that contain informational events, error and warning messages relevant to the application.

Roboter-Ausführungsprotokolle

Robot Execution Logs are messages generated by the execution of a process. They contain information related to its behavior and user-defined messages in the workflow.

Execution logs are generated by:

  • The Write Line activity, which creates logs at the Trace level.
  • The Log Message activity, which creates logs at the level specified in the Level property field of the activity.
  • Running an automation project, which generates logs that contain the behavior of each activity. These logs use Trace level if the Level setting in the Orchestrator Settings window in Assistant is set to Verbose.

Protokollierungsstufe der Ausführungsprotokolle

Die standardmäßige Protokollierungsstufe wird über die Einstellung Stufe (Level) im Fenster Orchestrator-Einstellungen (Orchestrator Settings) gesteuert. Standardmäßig ist sie auf Informationen (Information) festgelegt.

📘

Hinweis:

The log level set in Orchestrator for the robot overrides the one set in the UiPath Assistant.

Changing the Default Logging Level from the Assistant:

  1. Öffnen Sie in UiPath Assistant zuerst das Menü „Einstellungen“ und dann Orchestrator-Einstellungen.
  2. Wählen Sie die gewünschte Protokollierungsstufe im Dropdown-Menü Protokollstufe des Abschnitts Protokollierung.
640640

📘

Hinweis:

If the Robot is installed in service mode, administrator permissions are needed to edit this setting.

Orchestrator target

If the Robot is connected to Orchestrator, all execution logs are sent to Orchestrator and can be seen in the Logs page.

Wenn der Orchestrator nicht verfügbar ist, werden die Protokolle in einer lokalen Datenbank (C:\Windows\SysWOW64\config\systemprofile\AppData\Local\UiPath\Logs\execution_log_data) innerhalb des verfügbaren Platzes auf der Festplatte gespeichert, bis die Verbindung wiederhergestellt wird. Ist die Verbindung wiederhergestellt, werden die Protokolle in Batches in der Reihenfolge gesendet, in der sie erzeugt wurden.

📘

Hinweis:

Die Datenbank wird nicht gelöscht, nachdem die Protokolle erfolgreich an Orchestrator gesendet wurden.

NLog target

Außerdem lassen sich die Ziele und der Inhalt der Protokolle durch Bearbeiten der Datei <Installation Folder>\NLog.config konfigurieren.

The target location of the logs is controlled by the <Installation Folder>\NLog.config file. The Diagnostic logs are collected by the Internal type logger and are forwarded by using NLog targets.

By default, Execution Logs are stored in a file in the %LocalAppData%\UiPath\Logs folder. The messages are collected by the WorkflowLogging logger and can be forwarded by using NLog targets, as specified by the following parameters in the NLog.config file:

<?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">
  <variable name="WorkflowLoggingDirectory" value="${specialfolder:folder=LocalApplicationData}/UiPath/Logs" />
  <rules>
    <logger name="WorkflowLogging" writeTo="WorkflowLogFiles" final="true" />
  </rules>
  <targets>
    <target type="File" name="WorkflowLogFiles" fileName="${WorkflowLoggingDirectory}/${shortdate}_Execution.log" layout="${time} ${level} ${message}" keepFileOpen="true" openFileCacheTimeout="5" concurrentWrites="true" encoding="utf-8" writeBom="true" />
  </targets>
</nlog>

Deleting old log files

To avoid creating a large amount of log files consuming disk space on the machine, you can choose to archive log files once a specific number files has been reached.

This is done by adding the following parameters in the <target> tag:

  • archiveNumbering="Date"
  • archiveEvery="Day"
  • archiveDateFormat="yyyy-MM-dd"
  • archiveFileName="${WorkflowLoggingDirectory}/{#}_Execution.log"
  • maxArchiveFiles="10"
<?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">
  <variable name="WorkflowLoggingDirectory" value="${specialfolder:folder=LocalApplicationData}/UiPath/Logs" />
  <rules>
    <logger name="WorkflowLogging" writeTo="WorkflowLogFiles" final="true" />
  </rules>
  <targets>
    <target type="File"
      name="WorkflowLogFiles"
      fileName="${WorkflowLoggingDirectory}/${shortdate}_Execution.log"
      layout="${time} ${level} ${message}"
      keepFileOpen="true"
      openFileCacheTimeout="5"
      concurrentWrites="true"
      encoding="utf-8"
      writeBom="true"
      archiveNumbering="Date"
      archiveEvery="Day"
      archiveDateFormat="yyyy-MM-dd"
      archiveFileName="${WorkflowLoggingDirectory}/{#}_Execution.log"
      maxArchiveFiles="10"
    />
  </targets>
</nlog>

:information-source: The maxArchiveFiles is the parameter controlling the number of archive files.

📘

Hinweis:

Editing the NLog.config file requires administrator permissions. The robot service does not need to be restarted for the changes to take effect.

Weitere Bearbeitung der Protokolle

If the logging level is set to Verbose, the messages contain all the details about the activities that were run at execution. This log output can be customized by editing the UiPath.Executor.exe.config file, from C:\Program Files\UiPath\Studio folder.

For this, the following XML code must be added under the <system.serviceModel> tag.

<tracking>
    <profiles>
        <trackingProfile name="StandardProfile">
         <workflow>
          <activityStateQueries>  
            <activityStateQuery activityName="*">
                <states>  
                    <state name="Faulted"/>  
                </states>
                <arguments>  
                    <argument name="*"/>  
                </arguments> 
                 <variables>  
                    <variable name="*"/>  
                </variables>             
            </activityStateQuery>
          </activityStateQueries>    
         </workflow>
        </trackingProfile>       
    </profiles>
</tracking>

Da das Tag <states> nur <state name="Faulted"/> enthält, aktiviert das Einfügen des obigen Codes nur die Protokollierung von Aktivitäten, die den Zustand Faulted aufweisen. Das Hinzufügen weiterer Parameter unter dem Tag <states>, wie <state name="Executing"/>, führt dazu, dass Aktivitäten mit anderen Zuständen ebenfalls protokolliert werden.

Not only activity states can be modified, but also variables and arguments. More information about customization can be found here.

📘

Hinweis:

Modifying the UiPath.Executor.exe.config file requires a restart of the robot service for changes to take effect.

Roboter-Diagnoseprotokolle

The robot diagnostic logs provide information related to the Robot itself and its context. They are useful to identify the cause of a specific error.

Robot diagnostic logs are saved in the following locations:

  • On Windows, diagnostic errors are logged in the Event Viewer.
  • On all platforms, verbose diagnostic logs are also written to a file:
    • %LocalAppData%\UiPath\Logs\internal\Robot.log on Windows when the robot is installed in user mode.
    • %PROGRAMDATA%\UiPath\Logs\internal\Robot.log on Windows when the robot is installed in service mode.
    • ~/.share/local/UiPath/Logs/internal/Robot.log on other platforms.

Driver Diagnostic Logs

Driver Tracing is written to an .etl file.
To enable Driver Tracing, open Command Prompt with administrator rights, access the installation directory using the cd argument, such as cd C:\Program Files\UiPath\Studio, and run the UiRobot.exe --enableLowLevel command.
To disable Driver Tracing, open Command Prompt with administrator rights, access the installation directory using the cd argument, such as cd C:\Program Files\UiPath\Studio, and run the UiRobot.exe --disableLowLevel command.

📘

Driver Tracing Note:

Es wird empfohlen, die Ablaufverfolgung auf niedriger Ebene nur zu aktivieren, während ein Problem untersucht wird, und sie zu deaktivieren, wenn die Untersuchung beendet ist.
Zudem wird die .etl-Datei mit den Ablaufverfolgungsinformationen erst generiert, nachdem Sie die Funktion deaktiviert haben.
The Robot does not have to be restarted for the changes to take effect.

Updated 23 days ago


Roboter-Protokolle


Auf API-Referenzseiten sind Änderungsvorschläge beschränkt

Sie können nur Änderungen an dem Textkörperinhalt von Markdown, aber nicht an der API-Spezifikation vorschlagen.