rplog
v1.0.6
Published
log
Downloads
7
Readme
rplog
Installation
Using npm:
$ npm i rplog
Note: add --save
if you are using npm < 5.0.0
USE
use in Vue
<script>
import Rplogs from 'rplog' //1. 引入
const rp = new Rplogs('https://kaier001.com/rplog') //2. 传入socket url
const response = {
code: 0,
data: { },
message: 'success'
}
rp.responseParams(JSON.stringify(response)) //3. 调用方法
// 4. web端查看日志
</script>
方法
requestParams
请求参数日志
- @param {string)} data
const requestParams = {
name: 'xxx',
age: 18
}
rp.requestParams(JSON.stringify(requestParams))
responseParams
返回参数日志
- @param {string)} data
const response = {
code: 0,
data: { },
message: 'success'
}
rp.responseParams(JSON.stringify(response))