1.0.2 • Published 4 years ago
@motebus/ei-log v1.0.2
Enronment Parameters
- APP_NAME: the name of app
- DC: the MMA of device center (dc)
- IOC: the MMA of IOC center (ioc)
- MOTEBUS_GATEWAY: the ip of motebus gateway
- LOGDB_PATH: the physical path and file name of data base, ( for example: /usr/log/log.db )
- EI_NAME: the name of this device
Command
Save
CLI: save (message) (tag) (account)
JSON: {"cmd":"save","msg":"(msg)","tag":"(tag)","acc":"(account)"}
Example:
1. save "Hello log service!"
2. save "2019/6/13 14:20:20 open file!" op
3. {"cmd":"save","msg":"2019/6/13 14:20:20 open file!","tag":"op"}
Search
CLI: search (search type) (search text) (query option) -f (query fields)
JSON: {"cmd":"search","srhtype":"(search type)","srhtext":"(search text)","option":"(query option) ,"queryfield":"(query field)"}
Example:
1. search last20
2. search tag op -f logid,time,msg
3. {"cmd":"search","srhtype":"tag","srhtext":"op","option":"last20","queryfield":"logid,time,msg,tag"}