Commit a9a1cf43 authored by 赵啸非's avatar 赵啸非

异常日志前端展示添加

parent 709888e4
...@@ -212,6 +212,237 @@ Content-Type: multipart/form-data ...@@ -212,6 +212,237 @@ Content-Type: multipart/form-data
``` ```
## 平台用户操作日志业务
### 查询平台用户操作日志业务列表
**请求URL:** operate/log/list
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 查询平台用户操作日志业务
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:------
page|Integer|否|当前页
size|Integer|否|每页条数,值为-1,查询所有记录
**请求样例:**
```
{
"page":1,
"size":10
}
```
**响应参数:**
参数名称|参数类型|描述
:---|:---|:------
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
 per_page|Integer|每页条数
 total|Integer|总条数
 last_page|Integer|总页数
 current_page|Integer|当前页
 data|array|结果集列表|数组
  id|Long|主键ID
  platformMark|String|平台标识
  userId|Long|用户id
  userName|String|用户名称
  loginName|String|用户登录名
  requestUrl|String|请求地址
  content|String|操作内容,记录操作具体信息,如修改前修改或的数据
  ip|String|操作IP地址
  logDate|Date|操作时间
  operType|Integer|操作类型,0:新增,1:修改,2:删除
  createUserId|Long|创建用户
  createTime|Date|创建时间
dict|object|字典对象
**响应消息样例:**
```
{
"code":1,
"data":{
}
}
```
### 查看平台用户操作日志业务
**请求URL:** operate/log/info
**请求方式:** GET
**内容类型:** application/json;charset=utf-8
**简要描述:** 查看平台用户操作日志业务,返回实例详细信息
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:------
id|Long|是|ID
**请求样例:**
```
http://localhost/operate/log/info?id=549
```
**响应参数:**
参数名称 |参数类型|描述
:---|:---|:-------
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
 id|Long|主键ID
 platformMark|String|平台标识
 userId|Long|用户id
 userName|String|用户名称
 loginName|String|用户登录名
 requestUrl|String|请求地址
 content|String|操作内容,记录操作具体信息,如修改前修改或的数据
 ip|String|操作IP地址
 logDate|Date|操作时间
 operType|Integer|操作类型,0:新增,1:修改,2:删除
 createUserId|Long|创建用户
 createTime|Date|创建时间
dict|object|字典对象
**响应消息样例:**
```
{
"code": 1,
"data": {
"id":7025,
"platformMark":"lfxhqu",
"userId":3376,
"userName":"jt6u6e",
"loginName":"d3f0jt",
"requestUrl":"e6iazl",
"content":"rodscn",
"ip":"099s7n",
"logDate":"2022-08-25",
"operType":3202,
"createUserId":1212,
"createTime":"2022-08-25"
}
}
```
### 保存更新平台用户操作日志业务
**请求URL:** operate/log/save
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 保存或更新平台用户操作日志业务:id为空时为新增保存,否则为更新提交
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:-------
platformMark|String|否|平台标识
userId|Long|否|用户id
userName|String|否|用户名称
loginName|String|否|用户登录名
requestUrl|String|否|请求地址
content|String|否|操作内容,记录操作具体信息,如修改前修改或的数据
ip|String|否|操作IP地址
logDate|Date|否|操作时间
operType|Integer|否|操作类型,0:新增,1:修改,2:删除
**请求样例:**
```
{
"platformMark":"7iw3sc",
"userId":7212,
"userName":"wbpriu",
"loginName":"aet2rq",
"requestUrl":"5ua2fd",
"content":"0slnl4",
"ip":"p340fy",
"logDate":"2022-08-25",
"operType":5047,
}
```
**响应参数:**
参数名称 |参数类型|描述
:---|:---|:------
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
 id|Long|保存后主键id
 entity|object|保存更新实体
  id|Long|主键ID
  platformMark|String|平台标识
  userId|Long|用户id
  userName|String|用户名称
  loginName|String|用户登录名
  requestUrl|String|请求地址
  content|String|操作内容,记录操作具体信息,如修改前修改或的数据
  ip|String|操作IP地址
  logDate|Date|操作时间
  operType|Integer|操作类型,0:新增,1:修改,2:删除
  createUserId|Long|创建用户
  createTime|Date|创建时间
**响应消息样例:**
```
{
"msg":"新增模块成功",
"code":1,
"data":{}
}
}
```
### 删除平台用户操作日志业务
**请求URL:** operate/log/delete
**请求方式:** GET
**内容类型:** application/json;charset=utf-8
**简要描述:** 删除平台用户操作日志业务
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:------
id|String|是|数组
**请求样例:**
```
http://localhost:8080/operate/log/delete?id=1&id=2'
```
**响应参数:**
参数名称 |参数类型|备注|其它
---|---|---|---
code|Integer|结果码(-1.失败,1.成功)|-
msg|String|消息|-
**响应消息样例:**
```
{
"code":1,
"msg":"成功"
}
```
## 访问日志 ## 访问日志
### 查询访问日志列表 ### 查询访问日志列表
...@@ -261,7 +492,6 @@ data|object|数据对象 ...@@ -261,7 +492,6 @@ data|object|数据对象
  logLevel|String|日志等级   logLevel|String|日志等级
  requestIp|String|请求者IP   requestIp|String|请求者IP
  method|String|请求方式   method|String|请求方式
  schema|String|协议
  ua|String|用户浏览器UA   ua|String|用户浏览器UA
  uri|String|请求URI   uri|String|请求URI
  requestData|String|请求参数,json序列化   requestData|String|请求参数,json序列化
...@@ -272,6 +502,7 @@ data|object|数据对象 ...@@ -272,6 +502,7 @@ data|object|数据对象
  duration|Long|持续时间,单位毫秒   duration|Long|持续时间,单位毫秒
  createUserId|Long|创建用户   createUserId|Long|创建用户
  createTime|Date|创建时间   createTime|Date|创建时间
  schemaData|String|协议
dict|object|字典对象 dict|object|字典对象
**响应消息样例:** **响应消息样例:**
...@@ -320,7 +551,6 @@ data|object|数据对象 ...@@ -320,7 +551,6 @@ data|object|数据对象
 logLevel|String|日志等级  logLevel|String|日志等级
 requestIp|String|请求者IP  requestIp|String|请求者IP
 method|String|请求方式  method|String|请求方式
 schema|String|协议
 ua|String|用户浏览器UA  ua|String|用户浏览器UA
 uri|String|请求URI  uri|String|请求URI
 requestData|String|请求参数,json序列化  requestData|String|请求参数,json序列化
...@@ -331,6 +561,7 @@ data|object|数据对象 ...@@ -331,6 +561,7 @@ data|object|数据对象
 duration|Long|持续时间,单位毫秒  duration|Long|持续时间,单位毫秒
 createUserId|Long|创建用户  createUserId|Long|创建用户
 createTime|Date|创建时间  createTime|Date|创建时间
 schemaData|String|协议
dict|object|字典对象 dict|object|字典对象
**响应消息样例:** **响应消息样例:**
...@@ -338,27 +569,27 @@ dict|object|字典对象 ...@@ -338,27 +569,27 @@ dict|object|字典对象
{ {
"code": 1, "code": 1,
"data": { "data": {
"id":7635, "id":877,
"traceID":"0tj24m", "traceID":"nfxiws",
"pspanId":1924, "pspanId":4158,
"spanId":5615, "spanId":6097,
"appName":"ntxdiz", "appName":"lvzvak",
"hostName":"u7esz1", "hostName":"eyhvfs",
"targetServer":"rlj8lh", "targetServer":"ci0z4o",
"logLevel":"hzemsx", "logLevel":"njncwd",
"requestIp":"cme1cq", "requestIp":"6fn46g",
"method":"6eosdt", "method":"3dgoa3",
"schema":"yjlki4", "ua":"xej4dj",
"ua":"nl06uh", "uri":"pobins",
"uri":"hsuwg5", "requestData":"5ig9w1",
"requestData":"16s8fd", "responseData":"167sr5",
"responseData":"pi1iud", "logTime":"2022-08-25",
"logTime":"2022-08-19", "requestTime":"2022-08-25",
"requestTime":"2022-08-19", "responseTime":"2022-08-25",
"responseTime":"2022-08-19", "duration":4092,
"duration":1396, "createUserId":3160,
"createUserId":6560, "createTime":"2022-08-25",
"createTime":"2022-08-19" "schemaData":"usfbm0"
} }
} }
``` ```
...@@ -377,32 +608,46 @@ dict|object|字典对象 ...@@ -377,32 +608,46 @@ dict|object|字典对象
参数名称|类型|必填|描述 参数名称|类型|必填|描述
:---|:---|:---|:------- :---|:---|:---|:-------
id|Long|否|主键ID traceID|String|否|TraceId
pspanId|Integer|否|父服务调用id
spanId|Integer|否|当前服务跨度Id
appName|String|否|应用名称
hostName|String|否|实例IP
targetServer|String|否|目标服务
logLevel|String|否|日志等级
requestIp|String|否|请求者IP
method|String|否|请求方式
ua|String|否|用户浏览器UA
uri|String|否|请求URI
requestData|String|否|请求参数,json序列化
responseData|String|否|响应结果,
logTime|Date|是|日志产生时间 logTime|Date|是|日志产生时间
createUserId|Long|否|创建用户 requestTime|Date|否|请求时间
createTime|Date|否|创建时间 responseTime|Date|否|响应时间
duration|Long|否|持续时间,单位毫秒
schemaData|String|否|协议
**请求样例:** **请求样例:**
``` ```
{ {
"traceID":"k3wjwl", "traceID":"lgse97",
"pspanId":6376, "pspanId":949,
"spanId":6876, "spanId":5937,
"appName":"i7shif", "appName":"fnxe1s",
"hostName":"2ukyl7", "hostName":"l5emnm",
"targetServer":"v43pht", "targetServer":"86a47d",
"logLevel":"wndrrh", "logLevel":"9s9bk2",
"requestIp":"tlyvvh", "requestIp":"5ricie",
"method":"b83dee", "method":"oza7x8",
"schema":"hwpd56", "ua":"8bzvfh",
"ua":"d52vor", "uri":"x5fbfq",
"uri":"c5te0l", "requestData":"mmbhs8",
"requestData":"uwtl25", "responseData":"jzlxtk",
"responseData":"81900k", "logTime":"2022-08-25",
"logTime":"2022-08-19", "requestTime":"2022-08-25",
"requestTime":"2022-08-19", "responseTime":"2022-08-25",
"responseTime":"2022-08-19", "duration":9041,
"duration":7934, "schemaData":"9el561"
} }
``` ```
...@@ -425,7 +670,6 @@ data|object|数据对象 ...@@ -425,7 +670,6 @@ data|object|数据对象
  logLevel|String|日志等级   logLevel|String|日志等级
  requestIp|String|请求者IP   requestIp|String|请求者IP
  method|String|请求方式   method|String|请求方式
  schema|String|协议
  ua|String|用户浏览器UA   ua|String|用户浏览器UA
  uri|String|请求URI   uri|String|请求URI
  requestData|String|请求参数,json序列化   requestData|String|请求参数,json序列化
...@@ -436,6 +680,7 @@ data|object|数据对象 ...@@ -436,6 +680,7 @@ data|object|数据对象
  duration|Long|持续时间,单位毫秒   duration|Long|持续时间,单位毫秒
  createUserId|Long|创建用户   createUserId|Long|创建用户
  createTime|Date|创建时间   createTime|Date|创建时间
  schemaData|String|协议
**响应消息样例:** **响应消息样例:**
``` ```
...@@ -482,5 +727,562 @@ msg|String|消息|- ...@@ -482,5 +727,562 @@ msg|String|消息|-
"msg":"成功" "msg":"成功"
} }
```
## 业务日志
### 查询业务日志列表
**请求URL:** biz/log/list
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 查询业务日志
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:------
page|Integer|否|当前页
size|Integer|否|每页条数,值为-1,查询所有记录
**请求样例:**
```
{
"page":1,
"size":10
}
```
**响应参数:**
参数名称|参数类型|描述
:---|:---|:------
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
 per_page|Integer|每页条数
 total|Integer|总条数
 last_page|Integer|总页数
 current_page|Integer|当前页
 data|array|结果集列表|数组
  id|Long|主键ID
  traceID|String|追踪Id
  appName|String|应用名称
  hostName|String|实例IP
  logLevel|String|日志等级
  userCode|String|用户唯一标识
  deviceCode|String|设备唯一标识
  eventTopic|String|记录埋点的事件主题,方便实时计算或同步进行数据筛选
  eventTopicName|String|记录埋点中文名称
  msg|String|事件参数,json
  logTime|Date|日志产生时间
  createUserId|Long|创建用户
  createTime|Date|创建时间
dict|object|字典对象
**响应消息样例:**
```
{
"code":1,
"data":{
}
}
```
### 查看业务日志
**请求URL:** biz/log/info
**请求方式:** GET
**内容类型:** application/json;charset=utf-8
**简要描述:** 查看业务日志,返回实例详细信息
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:------
id|Long|是|ID
**请求样例:**
```
http://localhost/biz/log/info?id=549
```
**响应参数:**
参数名称 |参数类型|描述
:---|:---|:-------
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
 id|Long|主键ID
 traceID|String|追踪Id
 appName|String|应用名称
 hostName|String|实例IP
 logLevel|String|日志等级
 userCode|String|用户唯一标识
 deviceCode|String|设备唯一标识
 eventTopic|String|记录埋点的事件主题,方便实时计算或同步进行数据筛选
 eventTopicName|String|记录埋点中文名称
 msg|String|事件参数,json
 logTime|Date|日志产生时间
 createUserId|Long|创建用户
 createTime|Date|创建时间
dict|object|字典对象
**响应消息样例:**
```
{
"code": 1,
"data": {
"id":9662,
"traceID":"npntx3",
"appName":"umz7gh",
"hostName":"6tppvx",
"logLevel":"plvfrq",
"userCode":"xmb1yu",
"deviceCode":"lr59sg",
"eventTopic":"bw5sr5",
"eventTopicName":"d4lbk7",
"msg":"pzgls2",
"logTime":"2022-08-25",
"createUserId":6260,
"createTime":"2022-08-25"
}
}
```
### 保存更新业务日志
**请求URL:** biz/log/save
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 保存或更新业务日志:id为空时为新增保存,否则为更新提交
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:-------
traceID|String|否|追踪Id
appName|String|否|应用名称
hostName|String|否|实例IP
logLevel|String|否|日志等级
userCode|String|否|用户唯一标识
deviceCode|String|否|设备唯一标识
eventTopic|String|否|记录埋点的事件主题,方便实时计算或同步进行数据筛选
eventTopicName|String|否|记录埋点中文名称
msg|String|否|事件参数,json
logTime|Date|是|日志产生时间
**请求样例:**
```
{
"traceID":"emjxy8",
"appName":"9hosqj",
"hostName":"yibt9v",
"logLevel":"a92l8v",
"userCode":"jp66at",
"deviceCode":"l3rg6b",
"eventTopic":"09zus1",
"eventTopicName":"xiopsd",
"msg":"n41km8",
"logTime":"2022-08-25",
}
```
**响应参数:**
参数名称 |参数类型|描述
:---|:---|:------
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
 id|Long|保存后主键id
 entity|object|保存更新实体
  id|Long|主键ID
  traceID|String|追踪Id
  appName|String|应用名称
  hostName|String|实例IP
  logLevel|String|日志等级
  userCode|String|用户唯一标识
  deviceCode|String|设备唯一标识
  eventTopic|String|记录埋点的事件主题,方便实时计算或同步进行数据筛选
  eventTopicName|String|记录埋点中文名称
  msg|String|事件参数,json
  logTime|Date|日志产生时间
  createUserId|Long|创建用户
  createTime|Date|创建时间
**响应消息样例:**
```
{
"msg":"新增模块成功",
"code":1,
"data":{}
}
}
```
### 删除业务日志
**请求URL:** biz/log/delete
**请求方式:** GET
**内容类型:** application/json;charset=utf-8
**简要描述:** 删除业务日志
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:------
id|String|是|数组
**请求样例:**
```
http://localhost:8080/biz/log/delete?id=1&id=2'
```
**响应参数:**
参数名称 |参数类型|备注|其它
---|---|---|---
code|Integer|结果码(-1.失败,1.成功)|-
msg|String|消息|-
**响应消息样例:**
```
{
"code":1,
"msg":"成功"
}
```
## 异常日志
### 查询异常日志列表
**请求URL:** error/log/list
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 查询异常日志
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:------
page|Integer|否|当前页
size|Integer|否|每页条数,值为-1,查询所有记录
traceID|String|否|追踪Id,字段前后添加%%模糊查询
appName|String|否|应用名称,宿主客户端运行唯一标识。,字段前后添加%%模糊查询
hostName|String|否|主机名,字段前后添加%%模糊查询
message|String|否|消息标识,如用户登录异常。,字段前后添加%%模糊查询
platform|String|否|当前客户端使用平台(java,php,c#,android,vue,webos,ios,python),字段前后添加%%模糊查询
culprit|String|否|主要导致异常函数或方法调用名称及入参,字段前后添加%%模糊查询
tags|String|否|异常事件标记,多个逗号分隔。用以归集异常事件种类。,字段前后添加%%模糊查询
**请求样例:**
```
{
"traceID":"zvpzi5",
"appName":"s9ysi6",
"hostName":"663256",
"message":"kha3s6",
"platform":"7ylldc",
"culprit":"divomk",
"tags":"pdlthh",
"page":1,
"size":10
}
```
**响应参数:**
参数名称|参数类型|描述
:---|:---|:------
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
 per_page|Integer|每页条数
 total|Integer|总条数
 last_page|Integer|总页数
 current_page|Integer|当前页
 data|array|结果集列表|数组
  id|Long|主键ID
  traceID|String|追踪Id
  appName|String|应用名称,宿主客户端运行唯一标识。
  hostName|String|主机名
  message|String|消息标识,如用户登录异常。
  platform|String|当前客户端使用平台(java,php,c#,android,vue,webos,ios,python)
  culprit|String|主要导致异常函数或方法调用名称及入参
  tags|String|异常事件标记,多个逗号分隔。用以归集异常事件种类。
  level|String|等级(FATAL,ERROR,WARNING,INFO,DEBUG)
  environment|String|客户端运行环境变量信息
  releaseVersion|String|客户端运行版本信息
  fingerprint|String|指纹标识,对于相同异常事件归集数量使用。
  threadNo|String|线程号
  checkNum|Integer|针对同一个异常事件,数量加1
  errorStack|String|异常堆栈信息
  context|String|上下文信息,如js中发送异常事件,定位源码中信息。
  extra|String|扩展信息
  logTime|Date|日志时间
  createUserId|Long|创建用户
  createTime|Date|创建时间
  updateTime|Date|更新时间
dict|object|字典对象
 platform|object|字典属性对象,详见附录
 level|object|字典属性对象,详见附录
**响应消息样例:**
```
{
"code":1,
"data":{
}
}
```
### 查看异常日志
**请求URL:** error/log/info
**请求方式:** GET
**内容类型:** application/json;charset=utf-8
**简要描述:** 查看异常日志,返回实例详细信息
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:------
id|Long|是|ID
**请求样例:**
```
http://localhost/error/log/info?id=549
```
**响应参数:**
参数名称 |参数类型|描述
:---|:---|:-------
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
 id|Long|主键ID
 traceID|String|追踪Id
 appName|String|应用名称,宿主客户端运行唯一标识。
 hostName|String|主机名
 message|String|消息标识,如用户登录异常。
 platform|String|当前客户端使用平台(java,php,c#,android,vue,webos,ios,python)
 culprit|String|主要导致异常函数或方法调用名称及入参
 tags|String|异常事件标记,多个逗号分隔。用以归集异常事件种类。
 level|String|等级(FATAL,ERROR,WARNING,INFO,DEBUG)
 environment|String|客户端运行环境变量信息
 releaseVersion|String|客户端运行版本信息
 fingerprint|String|指纹标识,对于相同异常事件归集数量使用。
 threadNo|String|线程号
 checkNum|Integer|针对同一个异常事件,数量加1
 errorStack|String|异常堆栈信息
 context|String|上下文信息,如js中发送异常事件,定位源码中信息。
 extra|String|扩展信息
 logTime|Date|日志时间
 createUserId|Long|创建用户
 createTime|Date|创建时间
 updateTime|Date|更新时间
dict|object|字典对象
 platform|object|字典属性对象,详见附录
 level|object|字典属性对象,详见附录
**响应消息样例:**
```
{
"code": 1,
"data": {
"id":6735,
"traceID":"m5cz9e",
"appName":"jol5wv",
"hostName":"0hpdq8",
"message":"ob4z18",
"platform":"35r6ol",
"culprit":"4et2b0",
"tags":"oe7vrk",
"level":"nkb33c",
"environment":"tg3g27",
"releaseVersion":"efdlty",
"fingerprint":"lisrl9",
"threadNo":"mg3ye9",
"checkNum":7240,
"errorStack":"ujmjpc",
"context":"mrk7yw",
"extra":"goo44i",
"logTime":"2022-08-25",
"createUserId":8472,
"createTime":"2022-08-25",
"updateTime":"2022-08-25"
}
}
```
### 保存更新异常日志
**请求URL:** error/log/save
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 保存或更新异常日志:id为空时为新增保存,否则为更新提交
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:-------
traceID|String|否|追踪Id
appName|String|否|应用名称,宿主客户端运行唯一标识。
hostName|String|否|主机名
message|String|否|消息标识,如用户登录异常。
platform|String|否|当前客户端使用平台(java,php,c#,android,vue,webos,ios,python)
culprit|String|否|主要导致异常函数或方法调用名称及入参
tags|String|否|异常事件标记,多个逗号分隔。用以归集异常事件种类。
level|String|否|等级(FATAL,ERROR,WARNING,INFO,DEBUG)
environment|String|否|客户端运行环境变量信息
releaseVersion|String|否|客户端运行版本信息
fingerprint|String|否|指纹标识,对于相同异常事件归集数量使用。
threadNo|String|否|线程号
checkNum|Integer|否|针对同一个异常事件,数量加1
errorStack|String|否|异常堆栈信息
context|String|否|上下文信息,如js中发送异常事件,定位源码中信息。
extra|String|否|扩展信息
logTime|Date|否|日志时间
**请求样例:**
```
{
"traceID":"713akh",
"appName":"2bd1zh",
"hostName":"bv0448",
"message":"wo6n5j",
"platform":"l0fxnk",
"culprit":"1aygse",
"tags":"x395au",
"level":"7mzn0x",
"environment":"4c7a2c",
"releaseVersion":"odpclr",
"fingerprint":"vx4qa8",
"threadNo":"puuej1",
"checkNum":3833,
"errorStack":"p878b2",
"context":"g02r20",
"extra":"rrtpbv",
"logTime":"2022-08-25",
}
```
**响应参数:**
参数名称 |参数类型|描述
:---|:---|:------
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
 id|Long|保存后主键id
 entity|object|保存更新实体
  id|Long|主键ID
  traceID|String|追踪Id
  appName|String|应用名称,宿主客户端运行唯一标识。
  hostName|String|主机名
  message|String|消息标识,如用户登录异常。
  platform|String|当前客户端使用平台(java,php,c#,android,vue,webos,ios,python)
  culprit|String|主要导致异常函数或方法调用名称及入参
  tags|String|异常事件标记,多个逗号分隔。用以归集异常事件种类。
  level|String|等级(FATAL,ERROR,WARNING,INFO,DEBUG)
  environment|String|客户端运行环境变量信息
  releaseVersion|String|客户端运行版本信息
  fingerprint|String|指纹标识,对于相同异常事件归集数量使用。
  threadNo|String|线程号
  checkNum|Integer|针对同一个异常事件,数量加1
  errorStack|String|异常堆栈信息
  context|String|上下文信息,如js中发送异常事件,定位源码中信息。
  extra|String|扩展信息
  logTime|Date|日志时间
  createUserId|Long|创建用户
  createTime|Date|创建时间
  updateTime|Date|更新时间
**响应消息样例:**
```
{
"msg":"新增模块成功",
"code":1,
"data":{}
}
}
```
### 删除异常日志
**请求URL:** error/log/delete
**请求方式:** GET
**内容类型:** application/json;charset=utf-8
**简要描述:** 删除异常日志
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:------
id|String|是|数组
**请求样例:**
```
http://localhost:8080/error/log/delete?id=1&id=2'
```
**响应参数:**
参数名称 |参数类型|备注|其它
---|---|---|---
code|Integer|结果码(-1.失败,1.成功)|-
msg|String|消息|-
**响应消息样例:**
```
{
"code":1,
"msg":"成功"
}
``` ```
## 字典附录 ## 字典附录
### platform
字典参数key|字典参数值|其它
:---|:---|:---
java|java|-
php|php|-
c#|c#|-
android|android|-
vue|vue|-
webos|webos|-
ios|ios|-
python|python|-
### level
字典参数key|字典参数值|其它
:---|:---|:---
FATAL|FATAL|-
ERROR|ERROR|-
WARNING|WARNING|-
INFO|INFO|-
DEBUG|DEBUG|-
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
{label: "请求URI", prop: "uri"}, {label: "请求URI", prop: "uri"},
{label: "请求参数", prop: "requestData"}, {label: "请求参数", prop: "requestData",tooltip:"true"},
{label: "日志时间", prop: "logTime", formatter: this.formatterDate}, {label: "日志时间", prop: "logTime", formatter: this.formatterDate},
......
...@@ -32,13 +32,13 @@ ...@@ -32,13 +32,13 @@
<el-descriptions-item label="请求URI" label-class-name="labelClass" content-class-name="contentClass"> <el-descriptions-item label="请求URI" label-class-name="labelClass" content-class-name="contentClass">
{{form.uri}} {{form.uri}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="请求参数,json序列化" label-class-name="labelClass" content-class-name="contentClass"> <el-descriptions-item label="请求参数" label-class-name="labelClass" content-class-name="contentClass">
{{form.requestParam}} {{form.requestParam}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="响应结果" label-class-name="labelClass" content-class-name="contentClass"> <el-descriptions-item label="响应结果" label-class-name="labelClass" content-class-name="contentClass">
{{form.response}} {{form.response}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="日志产生时间" label-class-name="labelClass" content-class-name="contentClass"> <el-descriptions-item label="日志时间" label-class-name="labelClass" content-class-name="contentClass">
{{ util_formatterDate(form.logTime)}} {{ util_formatterDate(form.logTime)}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="持续时间,单位毫秒" label-class-name="labelClass" content-class-name="contentClass"> <el-descriptions-item label="持续时间,单位毫秒" label-class-name="labelClass" content-class-name="contentClass">
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
size="50%"> size="50%">
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row> <el-row>
<Field label="追踪Id" prop="traceID" v-model="form.traceID" placeholder="请输入追踪Id"/> <Field label="TraceId" prop="traceID" v-model="form.traceID" placeholder="请输入追踪Id"/>
<Field label="应用名称" prop="appName" v-model="form.appName" placeholder="请输入应用名称"/> <Field label="应用名称" prop="appName" v-model="form.appName" placeholder="请输入应用名称"/>
<Field label="实例IP" prop="hostName" v-model="form.hostName" placeholder="请输入实例IP"/> <Field label="实例IP" prop="hostName" v-model="form.hostName" placeholder="请输入实例IP"/>
<Field label="日志等级" prop="logLevel" v-model="form.logLevel" placeholder="请输入日志等级"/> <Field label="日志等级" prop="logLevel" v-model="form.logLevel" placeholder="请输入日志等级"/>
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
</el-row> </el-row>
<form-buttons @submit='submitForm' noCancelBtn />
</el-form> </el-form>
</el-drawer> </el-drawer>
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
{ {
name: "eventTopic", name: "eventTopic",
type: "text", type: "text",
label: "记录埋点的事件主题,方便实时计算或同步进行数据筛选", label: "记录埋点的事件主题",
fuzzy: true fuzzy: true
}, },
{ {
...@@ -91,15 +91,15 @@ ...@@ -91,15 +91,15 @@
{label: "应用名称", prop: "appName"}, {label: "应用名称", prop: "appName"},
{label: "用户唯一标识", prop: "userCode"}, {label: "用户标识", prop: "userCode"},
{label: "设备唯一标识", prop: "deviceCode"}, {label: "设备标识", prop: "deviceCode"},
{label: "记录埋点的事件主题,方便实时计算或同步进行数据筛选", prop: "eventTopic"}, {label: "事件主题", prop: "eventTopic"},
{label: "记录埋点中文名称", prop: "eventTopicName"}, {label: "主题名称", prop: "eventTopicName"},
{label: "日志产生时间", prop: "logTime", formatter: this.formatterDate}, {label: "日志时间", prop: "logTime", formatter: this.formatterDate},
{ {
label: "操作", label: "操作",
width: 120, width: 120,
......
...@@ -47,13 +47,19 @@ ...@@ -47,13 +47,19 @@
{ {
name: "traceID", name: "traceID",
type: "text", type: "text",
label: "追踪Id", label: "TraceId",
fuzzy: true fuzzy: true
}, },
{ {
name: "appName", name: "appName",
type: "text", type: "text",
label: "应用名称,宿主客户端运行唯一标识。", label: "应用标识",
fuzzy: true
},
{
name: "message",
type: "text",
label: "消息标识",
fuzzy: true fuzzy: true
}, },
], ],
...@@ -69,7 +75,7 @@ ...@@ -69,7 +75,7 @@
{label: "消息标识", prop: "message" ,tooltip:"true"}, {label: "消息标识", prop: "message" ,tooltip:"true"},
{label: "当前客户端使用平台", prop: "platform",formatter:this.formatter}, {label: "客户端使用平台", prop: "platform",formatter:this.formatter},
{label: "异常事件标记", prop: "tags"}, {label: "异常事件标记", prop: "tags"},
......
...@@ -113,14 +113,13 @@ ...@@ -113,14 +113,13 @@
} }
} }
</script> </script>
<style lang="less"> <style lang="scss" scoped >
.labelClass{ .labelClass{
width: 250px; width: 250px;
font-size: 13px; font-size: 13px;
color: #191a1b;
} }
.el-descriptions-item__label{
color: #191a1b;
}
.el-descriptions__body{ .el-descriptions__body{
margin-left: 5px; margin-left: 5px;
margin-right: 5px; margin-right: 5px;
...@@ -128,6 +127,6 @@ color: #191a1b; ...@@ -128,6 +127,6 @@ color: #191a1b;
background-color: #FFF; background-color: #FFF;
} }
.contentClass{ .contentClass{
width: 500px; width: 888px;
} }
</style> </style>
\ No newline at end of file
...@@ -62,6 +62,7 @@ public class ErrorMessageConsumerListener { ...@@ -62,6 +62,7 @@ public class ErrorMessageConsumerListener {
errorLogEntity.setCheckNum(errorLogEntity.getCheckNum()+1); errorLogEntity.setCheckNum(errorLogEntity.getCheckNum()+1);
errorLogEntity.setLogTime(entity.getLogTime()); errorLogEntity.setLogTime(entity.getLogTime());
errorLogEntity.setThreadNo(entity.getThreadNo()); errorLogEntity.setThreadNo(entity.getThreadNo());
errorLogEntity.setCreateTime(new Date());
errorLogEntity.setUpdateTime(new Date()); errorLogEntity.setUpdateTime(new Date());
errorLogService.update(errorLogEntity); errorLogService.update(errorLogEntity);
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment