Skip to content

Easy to use server for collecting and presenting logs from connected devices.

License

Notifications You must be signed in to change notification settings

Qase/LoggingServer

Repository files navigation

codebeat badge License: MIT Maintainer: Zdenál Qase: KotlinLogger

Logging server

Easy to use server for collecting and presenting logs from connected devices.

Features

  • 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

How do I run it localy?

Install

Run

  • cd PROJECT_ROOT_FOLDER
  • run npm install
  • run gulp libs
  • run gulp
  • use port 46379 for WebSocket or 63131 for REST Api
  • browse localhost:63131 for web interface

Share it outside of localhost

  • use utility called ngrok to tunnel your localhost
  • ngrok http 63131 for REST API
  • ngrok http 46379 for WebSocket

Endpoints

Log entity definition

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
Example
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
    }
]

License

MIT

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •