automation-suite
2023.4
false
重要 :
このコンテンツの一部は機械翻訳によって処理されており、完全な翻訳を保証するものではありません。 新しいコンテンツの翻訳は、およそ 1 ~ 2 週間で公開されます。
UiPath logo, featuring letters U and I in white
サポート対象外

EKS/AKS の Automation Suite のインストール ガイド

最終更新日時 2025年2月25日

ログのルールを設定する

概要

ロボット ログでは、診断ログと実行ログがキャプチャされます。Insights でロボット ログを取り込む条件を設定できます。たとえば、特定の名前を含むプロセスのログのみをキャプチャできます。

詳細については、「ロボット ログ」をご覧ください。

ログ ルールを設定する状況

  • Insights のインストール後
  • Insights のアップグレード後
  • ログ ルールを追加するか、既存のログ ルールを設定する場合

既定のログ ルール

Insights で取り込むロボット ログの既定の設定には、最後のログとエラー ログのみを取り込む設定が含まれます。以下のセクションでは、実行している Insights のバージョンに応じた既定のログ ルールを示します。

バージョン 2022.4 以降の既定のログ ルール

この例では、すべてのプロセスの最後のログとエラー ログが取り込まれます。このバージョンの Insights は、以下の例に示すように、プロセスを実行したロボットからの最後の Info レベルのログと、すべての Error レベルのログを取り込みます。

<logger name="Robot.*" ruleName="insightsRobotLogsRule" enabled="true" minlevel="Info" writeTo="insightsRobotLogs">
        <filters defaultAction="Ignore">
          <when condition="level &gt;= LogLevel.Error or ends-with('${message}',' execution ended')" action="Log" />
          <when condition="'${ui-robot-logs-num-custom-fields}' &gt; 1 and not ends-with('${message}', ' execution started')" action="Log" />
        </filters><logger name="Robot.*" ruleName="insightsRobotLogsRule" enabled="true" minlevel="Info" writeTo="insightsRobotLogs">
        <filters defaultAction="Ignore">
          <when condition="level &gt;= LogLevel.Error or ends-with('${message}',' execution ended')" action="Log" />
          <when condition="'${ui-robot-logs-num-custom-fields}' &gt; 1 and not ends-with('${message}', ' execution started')" action="Log" />
        </filters>

v2021.10 の既定のログ ルール

この例では、すべてのプロセスのすべてのログ (Info レベル以上) が取り込まれます。 このバージョンの Insights では、次の例に示すように、ロボットによってすべてのプロセスに対して生成されたすべてのログ (情報レベル以上) が取り込まれます。

<logger name="Robot.*" ruleName="insightsRobotLogsRule" enabled="true" minlevel="Info" writeTo="insightsRobotLogs"/><logger name="Robot.*" ruleName="insightsRobotLogsRule" enabled="true" minlevel="Info" writeTo="insightsRobotLogs"/>

ログのルールを設定する

Orchestrator の設定は nlog.custom.config ファイルで行えます。設定を変更するには、次の手順を実行します。
  1. 新しいログ ルールを nlog.custom.config ファイル内に配置します。 以下の詳細で例をご確認ください。
    {
      "10_Robot_Insights": {
        "logger": "Robot.*",
        "ruleName": "insightsRobotLogsRule",
        "minLevel": "Info",
        "writeTo": "insightsRobotLogs",
        "enabled": false,
        "final": false,
        "filters": {
          "defaultAction": "Ignore",
          "conditions": [
            {
              "condition": "level >= LogLevel.Error or ends-with('${message}', ' execution ended')",
              "action": "Log"
            }
          ]
        }
      }
    }{
      "10_Robot_Insights": {
        "logger": "Robot.*",
        "ruleName": "insightsRobotLogsRule",
        "minLevel": "Info",
        "writeTo": "insightsRobotLogs",
        "enabled": false,
        "final": false,
        "filters": {
          "defaultAction": "Ignore",
          "conditions": [
            {
              "condition": "level >= LogLevel.Error or ends-with('${message}', ' execution ended')",
              "action": "Log"
            }
          ]
        }
      }
    }
  2. Orchestrator 構成ツールを使用して構成を更新します。次のコマンドを使用して、カスタム nlog.custom.config ファイルのキーを、 orchestrator-customconfig 構成マップで既に使用可能な設定とマージします。
    ./orchestrator-configurator.sh -l nlog.custom.config ./orchestrator-configurator.sh -l nlog.custom.config
    このコマンドでは、既存の設定は削除されません。

ログ ルールの例

次の例では、特定のレベルを超えたログ、または実行が終了したことを示すメッセージを含むログのみを送信しています。

{
  "10_Robot_Insights": {
    "logger": "Robot.*",
    "ruleName": "insightsRobotLogsRule",
    "minLevel": "Info",
    "writeTo": "insightsRobotLogs",
    "enabled": false,
    "final": false,
    "filters": {
      "defaultAction": "Ignore",
      "conditions": [
        {
          "condition": "level >= LogLevel.Error or ends-with('${message}', ' execution ended')",
          "action": "Log"
        }
      ]
    }
  }
}{
  "10_Robot_Insights": {
    "logger": "Robot.*",
    "ruleName": "insightsRobotLogsRule",
    "minLevel": "Info",
    "writeTo": "insightsRobotLogs",
    "enabled": false,
    "final": false,
    "filters": {
      "defaultAction": "Ignore",
      "conditions": [
        {
          "condition": "level >= LogLevel.Error or ends-with('${message}', ' execution ended')",
          "action": "Log"
        }
      ]
    }
  }
}

特定のプロセスのすべてのログとエラー ログを取り込む

次の例では、Insights は、プロセス名 payment disp68fields、または 68fields_20 について、Info レベルおよび Error レベルのすべてのログを取り込みます。
<logger name="Robot.*" ruleName="insightsRobotLogsRule" enabled="true" minlevel="Info" writeTo="insightsRobotLogs">
    <filters defaultAction="Ignore">
      <when condition="equals('${event-properties:item=processName}', 'payment disp') or equals('${event-properties:item=processName}', '68fields') or equals('${event-properties:item=processName}', '68fields_20')" action="Log" />
    </filters>
  </logger><logger name="Robot.*" ruleName="insightsRobotLogsRule" enabled="true" minlevel="Info" writeTo="insightsRobotLogs">
    <filters defaultAction="Ignore">
      <when condition="equals('${event-properties:item=processName}', 'payment disp') or equals('${event-properties:item=processName}', '68fields') or equals('${event-properties:item=processName}', '68fields_20')" action="Log" />
    </filters>
  </logger>

特定のプロセスの最後のログとエラー ログのみを取り込む

次の例では、Insights は、プロセス名 payment disp68fields、または 68fields_20 について、Info レベルの最後のログと Error レベルのログのみを取り込みます。

Error レベルのログと、各ロボットの最後のログのみが Insights に取り込まれます。

<logger name="Robot.*" ruleName="insightsRobotLogsRule" enabled="true" minlevel="Info" writeTo="insightsRobotLogs">
    <filters defaultAction="Ignore">
      <when condition="(level >= LogLevel.Error or ends-with('${message}',' execution ended')) and (contains('${event-properties:item=processName}', 'payment disp') or equals('${event-properties:item=processName}', '68fields') or equals('${event-properties:item=processName}', '68fields_20'))" action="Log" />
    </filters>
  </logger><logger name="Robot.*" ruleName="insightsRobotLogsRule" enabled="true" minlevel="Info" writeTo="insightsRobotLogs">
    <filters defaultAction="Ignore">
      <when condition="(level >= LogLevel.Error or ends-with('${message}',' execution ended')) and (contains('${event-properties:item=processName}', 'payment disp') or equals('${event-properties:item=processName}', '68fields') or equals('${event-properties:item=processName}', '68fields_20'))" action="Log" />
    </filters>
  </logger>

特定のプロセスのログを取り込まない

以下の例では、Insights は、プロセス名 payment disp についてログを一切取り込みません。
<logger name="Robot.*" ruleName="insightsRobotLogsRule" enabled="true" minlevel="Info" writeTo="insightsRobotLogs">
    <filters defaultAction="Log">
      <when condition="equals('${event-properties:item=processName}', 'payment disp')" action="Ignore" />
    </filters>
  </logger><logger name="Robot.*" ruleName="insightsRobotLogsRule" enabled="true" minlevel="Info" writeTo="insightsRobotLogs">
    <filters defaultAction="Log">
      <when condition="equals('${event-properties:item=processName}', 'payment disp')" action="Ignore" />
    </filters>
  </logger>

関連ドキュメント

このページは役に立ちましたか?

サポートを受ける
RPA について学ぶ - オートメーション コース
UiPath コミュニティ フォーラム
Uipath Logo White
信頼とセキュリティ
© 2005-2025 UiPath. All rights reserved.