Easy to use server for collecting and presenting logs from connected devices.
- Written in javascript
- Supports REST api as well as WebSocket connections
- Filter logs by session name, log severity or message content
- Project is constantly developed
- Option 1:
- install
nvmfrom: https://github.com/creationix/nvm (instructions are in readme) - install
nodejs v10.15.0by:nvm install v10.15.0
- install
- Option 2:
- install latest
nodestable from here: https://nodejs.org/en/download/
- install latest
cd PROJECT_ROOT_FOLDER- run
npm install - run
gulp libs - run
gulp - use port
46379for WebSocket or63131for REST Api - browse
localhost:63131for web interface
- use utility called ngrok to tunnel your localhost
ngrok http 63131for REST APIngrok http 46379for WebSocket
| Field name | Field type | Can be empty | Description |
|---|---|---|---|
| id | String | YES | server id of log entity |
| messsage | String | NO | content of log |
| sessionName | String | NO | filtering name |
| severity | String | NO | one of type - verbose, debug, info, warning, error, fatal |
| timestamp | Int | NO | unix time in milliseconds |
| REST api | |
|---|---|
| rest function | POST |
| http address | http://webserver/api/v1/log/ |
| headers | Content-Type - application/json; charset=UTF-8 |
| body | json - array of log entities |
| other | be careful of max payload size 100kB |
| response | the exact same text with log id set |
| WebSocket | |
|---|---|
| address | ws://webserver/ws/v1/ |
| body | json - array of log entities |
| response | no response |
POST /api/v1/log/ HTTP/1.1
Host: webserver
Content-Type: application/json; charset=UTF-8
[
{
"id": "",
"message": "Test log message",
"sessionName": "MyAndroidSession",
"severity": "ERROR",
"timestamp": 1547927957870
}
]