Note the following terminology:
The following is an example of a LogEntry
:
Log Entry for Console Log in HTTP Function
{
"timestamp": "2019-03-31T06:02:12.008Z",
"receiveTimestamp": "2019-03-31T06:02:12.925Z",
"severity": "INFO",
"insertId": "6axgiF6X45ftx7A1bjJBCh",
"labels": {
"siteUrl": "https://my-site.com",
"namespace": "Velo",
"tenantId": "fbd4e3c6-8e55-4098-b0ff-5e478b6c957e",
"viewMode": "Site",
"revision": "12"
},
"operation": {
"id": "1554017373.14484058793726342",
"producer": "httpFunction:myFunction",
},
"sourceLocation": {
"file": "http-functions.js",
"line": 14
},
"jsonPayload": {
"message": "myFunction called."
}
}
Note: Currently, you cannot add content to log entries. All log entry data is generated by Velo.
Unique identifier for the log entry.
Each log entry is assigned a unique ID. A log entry with the same insertId
as another log entry indicates a duplicate.
{
// ...
"insertId": "6axgiF6X45ftx7A1bjJBCh",
// ...
}
Payload of the log entry in JSON format.
{
// ...
"jsonPayload": {
"message": "#contactUs button was clicked." // Console log
},
// ...
}
Additional information about the log entry.
{
// ...
"labels": {
"siteUrl": "https://my-site.com",
"namespace": "Velo",
"tenantId": "fbd4e3c6-8e55-4098-b0ff-5e478b6c957e",
"viewMode": "Site",
"revision": "12"
},
// ...
}
Additional information about a potentially long-running operation associated with the log entry.
Some operations, such as an HTTP function call or a scheduled task, include
several log entries. The operation
object lets you identify all log entries
associated with a specific operation via the operation ID, which is unique
to each operation.
You can also use the producer
property to identify the context of the
operation, such as a URL path for page code or an HTTP function name.
Note: Currently only applicable for log entries with the Velo
namespace.
{
// ...
"operation": {
"id": "1554017373.14484058793726342",
"producer": "page:/about", // URL path of page within site
},
// ...
}
Time the log entry was received by site monitoring.
Displayed as UTC time in ISO 8601 format.
{
// ...
"receiveTimestamp": "2019-03-31T06:02:12.925Z",
// ...
}
Severity of the log entry.
One of the following standard severity levels:
"INFO"
: Status, performance, or other general information."WARNING"
: An unexpected or undesired development that may cause problems."ERROR"
: A serious issue that is likely to cause problems.{
// ...
"severity": "INFO",
// ...
}
Source code location information associated with the log entry.
Provides location information for source code associated with the log entry.
Note: Currently only applicable for backend log entries with the Velo
namespace.
{
// ...
"sourceLocation": {
"file": "http-functions.js",
"line": 24
},
// ...
}
Time the log occurred. Displayed as UTC time in ISO 8601 format.
{
// ...
"timestamp": "2019-03-31T06:02:12.008Z",
// ...
}