UiPath Documentation
automation-suite
2023.10
false
Linux 版 Automation Suite 安装指南
重要 :
新发布内容的本地化可能需要 1-2 周的时间才能完成。

配置日志规则

有关在 Automation Suite 中为 Insights 配置机器人日志提取规则和条件的参考。

概述​

机器人日志可捕获诊断日志和执行日志。您可以配置 Insights 用于提取机器人日志的条件。例如,您只想捕获包含特定名称的流程的日志。

有关详细信息,请参阅机器人日志。

配置日志规则​

您可以在 nlog.custom.config 文件中配置 Orchestrator 设置。要修改设置,请执行以下步骤:

  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"
        }
      ]
    }
  }
}
  • 概述​
  • 配置日志规则​
  • 日志规则示例​

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新