# 错误日志
# 获取错误概况
# 请求 URL:
http://host:port/heycloud/api/logs/error/summary
# 请求方式:
- GET
# 请求 Header:
字段 | 类型 | 是否必选 | 说明 |
---|---|---|---|
x-heycloud-admin-session | String | 是 | 通过 session 提供管理权限 |
# 请求示例:
GET http://host:port/heycloud/api/logs/error/summary
# 正确响应示例:
{
"result": {
"countInDay": 5
}
}
# 错误响应示例:
{
"error": "Error",
"message": "错误信息"
}
# 查询错误日志
# 请求 URL:
http://host:port/heycloud/api/logs/error/query
# 请求方式:
- POST
# 请求 Header:
字段 | 类型 | 是否必选 | 说明 |
---|---|---|---|
x-heycloud-admin-session | String | 是 | 通过 session 提供管理权限 |
# 请求参数:
参数名称 | 类型 | 是否必须 | 默认值 | 说明 |
---|---|---|---|---|
app | String | 否 | - | 检索指定 app 的日志,如不指定则在所有日志中检索 |
before | String | 否 | - | 只检索该时间戳之前的日志,时间戳格式为 ISO String |
offset | Number | 否 | - | 返回结果的偏移量,用于分页 |
limit | Number | 否 | - | 返回结果的数量,用于分页 |
# 请求示例:
POST http://host:port/heycloud/api/logs/error/query
{
"app": "heycloud-logs-api",
"before": "2021-01-29T06:37:45.626Z",
"offset": 0,
"limit": 11
}
# 正确响应示例:
{
"result": [
{
"time": "2021-03-10T08:49:34.875Z",
"data": {
"body": {},
"method": "GET",
"href": "http://localhost:9000/individual/basemap.web-mercator"
},
"app": "heycloud-base-api",
"version": "0.8.0",
"err": "TypeError: Cannot read property 'value' of undefined\n at /geohey/app/main.js:5:6673\n at runMicrotasks (<anonymous>)\n at processTicksAndRejections (internal/process/task_queues.js:93:5)\n at async /geohey/app/main.js:5:6493\n at async /geohey/node_modules/@geohey/heycloud-koa-middlewares/@geohey/heycloud-koa-middlewares.js:5:530\n at async /geohey/node_modules/@geohey/koa-errors/@geohey/koa-errors.js:5:74"
}
]
}
# 错误响应示例:
{
"error": "Error",
"message": "错误信息"
}