这些 Firebase Google Cloud Function `DEBUG` 严重性日志是什么意思?
What do these Firebase Google Cloud Function `DEBUG` severity logs mean?
我一直在使用 Logs Explorer 检查我的 Firebase Google Cloud Function。
云功能按预期工作,所以我很惊讶地在日志资源管理器中找到各种 DEBUG
严重性日志。
此外,在查看这些日志时,没有任何关于原因或问题的明确信息。
为什么我会看到这些 DEBUG
严重性日志,它们是什么意思?
这是日志资源管理器中 DEBUG
日志的屏幕截图:
这里是每个 DEBUG
日志的有效负载:
调试日志 1:
{
"textPayload": "Function execution started",
"insertId": "000000-8ce5e770-7b77-4a3b-b117-d1da870c625c",
"resource": {
"type": "cloud_function",
"labels": {
"project_id": "agentcake-app-75f12",
"region": "us-central1",
"function_name": "getZohoDeskTicketsLoggedInUser"
}
},
"timestamp": "2022-04-01T07:22:43.908875861Z",
"severity": "DEBUG",
"labels": {
"execution_id": "algpjnkt4jk5"
},
"logName": "projects/agentcake-app-75f12/logs/cloudfunctions.googleapis.com%2Fcloud-functions",
"trace": "projects/agentcake-app-75f12/traces/499b082c83a571995237fe47e65243d1",
"receiveTimestamp": "2022-04-01T07:22:54.727147697Z"
}
调试日志 2:
{
"textPayload": "Function execution took 39 ms, finished with status code: 204",
"insertId": "000000-8f0e70dd-10c4-4d0a-a319-f73ce04f4f33",
"resource": {
"type": "cloud_function",
"labels": {
"project_id": "agentcake-app-75f12",
"function_name": "getZohoDeskTicketsLoggedInUser",
"region": "us-central1"
}
},
"timestamp": "2022-04-01T07:22:43.947441971Z",
"severity": "DEBUG",
"labels": {
"execution_id": "algpjnkt4jk5"
},
"logName": "projects/agentcake-app-75f12/logs/cloudfunctions.googleapis.com%2Fcloud-functions",
"trace": "projects/agentcake-app-75f12/traces/499b082c83a571995237fe47e65243d1",
"receiveTimestamp": "2022-04-01T07:22:54.727147697Z"
}
调试日志 3:
{
"textPayload": "Function execution started",
"insertId": "000000-1252ca30-6f7a-477f-9845-ed1c06ad9d25",
"resource": {
"type": "cloud_function",
"labels": {
"region": "us-central1",
"function_name": "getZohoDeskTicketsLoggedInUser",
"project_id": "agentcake-app-75f12"
}
},
"timestamp": "2022-04-01T07:22:44.313316115Z",
"severity": "DEBUG",
"labels": {
"execution_id": "algpnb41b69d"
},
"logName": "projects/agentcake-app-75f12/logs/cloudfunctions.googleapis.com%2Fcloud-functions",
"trace": "projects/agentcake-app-75f12/traces/a78c37916b173ecac071ee290da7d968",
"receiveTimestamp": "2022-04-01T07:22:54.727147697Z"
}
调试日志 4:
{
"textPayload": "Function execution took 3141 ms, finished with status code: 200",
"insertId": "000000-da00728a-e2f2-45f3-a4f2-3b17a4c2ada8",
"resource": {
"type": "cloud_function",
"labels": {
"region": "us-central1",
"function_name": "getZohoDeskTicketsLoggedInUser",
"project_id": "agentcake-app-75f12"
}
},
"timestamp": "2022-04-01T07:22:47.454109349Z",
"severity": "DEBUG",
"labels": {
"execution_id": "algpnb41b69d"
},
"logName": "projects/agentcake-app-75f12/logs/cloudfunctions.googleapis.com%2Fcloud-functions",
"trace": "projects/agentcake-app-75f12/traces/a78c37916b173ecac071ee290da7d968",
"receiveTimestamp": "2022-04-01T07:22:54.727147697Z"
}
Internal system messages have the DEBUG log level.
如 this document 中所述,Cloud Functions 日志中的 DEBUG
日志级别只是内部系统消息,即执行开始的时间、函数执行的状态、执行所花费的时间函数执行等记录为 DEBUG
日志级别。因此,即使您的 Cloud Functions 没有任何错误并且工作正常,它也会有 DEBUG
日志。
我一直在使用 Logs Explorer 检查我的 Firebase Google Cloud Function。
云功能按预期工作,所以我很惊讶地在日志资源管理器中找到各种 DEBUG
严重性日志。
此外,在查看这些日志时,没有任何关于原因或问题的明确信息。
为什么我会看到这些 DEBUG
严重性日志,它们是什么意思?
这是日志资源管理器中 DEBUG
日志的屏幕截图:
这里是每个 DEBUG
日志的有效负载:
调试日志 1:
{
"textPayload": "Function execution started",
"insertId": "000000-8ce5e770-7b77-4a3b-b117-d1da870c625c",
"resource": {
"type": "cloud_function",
"labels": {
"project_id": "agentcake-app-75f12",
"region": "us-central1",
"function_name": "getZohoDeskTicketsLoggedInUser"
}
},
"timestamp": "2022-04-01T07:22:43.908875861Z",
"severity": "DEBUG",
"labels": {
"execution_id": "algpjnkt4jk5"
},
"logName": "projects/agentcake-app-75f12/logs/cloudfunctions.googleapis.com%2Fcloud-functions",
"trace": "projects/agentcake-app-75f12/traces/499b082c83a571995237fe47e65243d1",
"receiveTimestamp": "2022-04-01T07:22:54.727147697Z"
}
调试日志 2:
{
"textPayload": "Function execution took 39 ms, finished with status code: 204",
"insertId": "000000-8f0e70dd-10c4-4d0a-a319-f73ce04f4f33",
"resource": {
"type": "cloud_function",
"labels": {
"project_id": "agentcake-app-75f12",
"function_name": "getZohoDeskTicketsLoggedInUser",
"region": "us-central1"
}
},
"timestamp": "2022-04-01T07:22:43.947441971Z",
"severity": "DEBUG",
"labels": {
"execution_id": "algpjnkt4jk5"
},
"logName": "projects/agentcake-app-75f12/logs/cloudfunctions.googleapis.com%2Fcloud-functions",
"trace": "projects/agentcake-app-75f12/traces/499b082c83a571995237fe47e65243d1",
"receiveTimestamp": "2022-04-01T07:22:54.727147697Z"
}
调试日志 3:
{
"textPayload": "Function execution started",
"insertId": "000000-1252ca30-6f7a-477f-9845-ed1c06ad9d25",
"resource": {
"type": "cloud_function",
"labels": {
"region": "us-central1",
"function_name": "getZohoDeskTicketsLoggedInUser",
"project_id": "agentcake-app-75f12"
}
},
"timestamp": "2022-04-01T07:22:44.313316115Z",
"severity": "DEBUG",
"labels": {
"execution_id": "algpnb41b69d"
},
"logName": "projects/agentcake-app-75f12/logs/cloudfunctions.googleapis.com%2Fcloud-functions",
"trace": "projects/agentcake-app-75f12/traces/a78c37916b173ecac071ee290da7d968",
"receiveTimestamp": "2022-04-01T07:22:54.727147697Z"
}
调试日志 4:
{
"textPayload": "Function execution took 3141 ms, finished with status code: 200",
"insertId": "000000-da00728a-e2f2-45f3-a4f2-3b17a4c2ada8",
"resource": {
"type": "cloud_function",
"labels": {
"region": "us-central1",
"function_name": "getZohoDeskTicketsLoggedInUser",
"project_id": "agentcake-app-75f12"
}
},
"timestamp": "2022-04-01T07:22:47.454109349Z",
"severity": "DEBUG",
"labels": {
"execution_id": "algpnb41b69d"
},
"logName": "projects/agentcake-app-75f12/logs/cloudfunctions.googleapis.com%2Fcloud-functions",
"trace": "projects/agentcake-app-75f12/traces/a78c37916b173ecac071ee290da7d968",
"receiveTimestamp": "2022-04-01T07:22:54.727147697Z"
}
Internal system messages have the DEBUG log level.
如 this document 中所述,Cloud Functions 日志中的 DEBUG
日志级别只是内部系统消息,即执行开始的时间、函数执行的状态、执行所花费的时间函数执行等记录为 DEBUG
日志级别。因此,即使您的 Cloud Functions 没有任何错误并且工作正常,它也会有 DEBUG
日志。