- このガイドについて
- スタート アップ ガイド
- インストールしています。
- アップグレード
- Connecting and licensing
- 構成する
- Running workloads
- RPA processes and tests
- Agents, functions, and API workflows
- 上限量
- Securing and governing
- 監視
- トラブルシューティング
- 参照
ロボット ログを管理する
Assistant または Orchestrator でロボットのログ レベルを設定し、NLog.config を使用してログ ファイルのアーカイブと削除を設定し、ディスク領域の使用を制御します。
ログ レベルを設定する
ログ レベルは次の方法で変更できます。
- [Assistant] > [設定] > [全般] ページの [ログ レベル] 設定。既定では、Information に設定されています。サービス モードの Robot の場合、管理者権限が必要です。
- Orchestrator > [アクセス権を管理] > [ユーザー] > [ユーザー] または [ロボット アカウント] > [ロボットの設定] ページの [ログ レベル] 設定。既定では、Information に設定されています。
注:
Orchestrator で設定されたログ レベルが Assistant で設定されたログ レベルよりも優先されます。
ログ ファイルを削除する
Starting with Robot version 2025.10.1, the Robot keeps the 30 most recent daily execution log files and deletes older ones.
ディスク容量の使用を抑えるために、ログ ファイルが特定の数に達したらログ ファイルをアーカイブできます。NLog.config ファイルの <target> セクションで次のようにログ ファイルを設定します。
- プロパティ
archiveNumbering="Date"とarchiveEvery="Day"を追加することにより、ログ ファイルを毎日アーカイブし、各アーカイブに日付で名前を付けるようシステムに指示します。 - プロパティ
archiveDateFormat="yyyy-MM-dd"で、アーカイブ ファイル名の日付の形式を設定します。 archiveFileName="${WorkflowLoggingDirectory}/{#}_Execution.log"で、アーカイブされるファイル名の場所と形式を指定します。maxArchiveFiles="30"プロパティで、最新の 30 個のアーカイブ ログ ファイルのみを保持するための制限を設定します。
A Robot update resets the NLog.config file, removing your edits. Apply them again after each update.
例:
<?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="30"
/>
</targets>
</nlog>
<?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="30"
/>
</targets>
</nlog>
詳細なログをカスタマイズする
Verbose-level logs may contain extra information and can be large. For Windows - Legacy projects, you can control this by customizing the UiPath.Executor.exe.config file, in the net472 folder of the Robot installation folder. Windows and cross-platform projects don't read this file.
A Robot update installs into a new versioned folder and copies only UiPath.config and NuGet.config to it, so your edits to UiPath.Executor.exe.config don't carry over. Apply them again after each update.
Add the following XML snippet under the <system.serviceModel> section, then restart the Robot Service:
<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>
<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>
<states> タグには、ログに記録する各ステートのサブタグが含まれます。<state name="Faulted"/> のみが含まれる場合は、エラー ステートで終了したアクティビティ、つまりエラーが発生したアクティビティのみがログに記録されます。
他のステートを含めるには、<state name="Executing"/> を使用します。
変数と引数もカスタマイズできます。Microsoft のドキュメントをご覧ください。
ドライバー診断ログを管理する
Driver tracing records the UiPath drivers and the browser extension. For the command reference, refer to Robot Command Line Interface.
ドライバー トレースを有効化するには、次の手順を実行します。
- コマンド プロンプトを管理者権限で開きます。
- Access the Robot installation directory using the
cdargument, such ascd "C:\Program Files\UiPathPlatform\Robot\<version>"for a per-machine installation, orcd "%LocalAppData%\Programs\UiPathPlatform\Robot\<version>"for a per-user installation. UiRobot.exe trace --enableLowLevelコマンドを実行します。
ドライバー トレースを無効化するには、次の手順を実行します。
- コマンド プロンプトを管理者権限で開きます。
- Access the Robot installation directory using the
cdargument, such ascd "C:\Program Files\UiPathPlatform\Robot\<version>"for a per-machine installation, orcd "%LocalAppData%\Programs\UiPathPlatform\Robot\<version>"for a per-user installation. UiRobot.exe trace --disableLowLevelコマンドを実行します。
The disable command saves the trace as UiPathTrace-<id>.etl on the Desktop of the user who runs the command.
診断ツールを使用する
実行ログを取得するように診断ツールを設定する方法については、『Studio ガイド』の「診断ツールについて」をご覧ください。