Cloudforms/manageiq日志格式说明登录自动化日志

Cloudforms/manageiq log format explanation logs in of automation log

ManageIQ 按以下形式在 automation.log 中创建日志:

[----] I, [2018-03-15T08:26:22.292771 #29399:3a99874]  INFO -- : Q-task_id([service_template_provision_request_1000000023798]) <AEMethod limits> Getting Tenant Quota Values for: {}
[----] I, [2018-03-15T08:26:23.335038 #29399:44d130]  INFO -- : Q-task_id([service_template_provision_request_1000000023798]) Followed  Relationship [miqaedb:/System/Request/SERVICE_PROVISION_INFO#create]
[----] I, [2018-03-15T08:26:27.058401 #29409:44d130]  INFO -- : Q-task_id([service_template_provision_task_1000000021859]) User [myuser] with current group ID [1000000000027] name [Domain mydomain (admin)]

我们可以看到日志行之间有一些链接。前 2 个具有相同的 service_template_provision_request 标识符,并且在开头的主题标签后的标识符中也具有相同的数字 (29399)。最后 2 个日志在开头的主题标签中的冒号后具有相同的标识符 (44d130)。我想知道所有这些是什么意思。

我知道 service_template_provision_request 对应于我在订购服务时分配的请求编号。但是我不明白带有标签的标识符的含义。

我的最终目标是能够确定哪些日志与哪个请求相关,与哪个任务相关,以及哪个任务是由哪个请求引起的。理想情况下按原样使用日志。

我想我可以更改代码,以便在每个任务开始时我们用请求 ID 记录任务 ID,但我想知道我是否可以避免这样做。

The first 2 have the same service_template_provision_request identifier and also have the same number in the identifier after the hashtag at the start (29399). The last 2 logs have the same identifier after the colon in the hashtag at the start (44d130). I'm wondering what all of these mean.

#29409:44d130 的第一部分(29409)是您在 topps 中看到的进程 ID。第二部分(44d130)是 Ruby 线程 ID, 进程中。在您的情况下,您有多个进程具有相同的表观线程 ID,但这完全是巧合。