jl-iot/server/iot_log.go
walker 151828f569 添加日志纪录及查询请求完善
-日志记录为内存记录,默认上限定为1000条
-查询请求查最新的指定条数
2023-12-22 15:06:08 +08:00

13 lines
261 B
Go

package server
import (
"joylink.club/iot/dto"
"joylink.club/iot/log"
)
// 获取IOT日志请求响应
func GetIotLog(req *dto.IotServiceLogReq) *dto.IotServiceLogResp {
tails := log.GetTailsOf(int(req.Count))
return &dto.IotServiceLogResp{Logs: tails}
}