Logging in JavaScript that is shared with a server or preserved in other ways. TEST STAGE. INCLUDES INCOMPLETE FEATURES INCLUDING SERVER HANDLING.
- To send data from client to server.
- To preserve data in case of problem(via localStorage, etc.)
- Clone this repository
- npm install
- create ./dist directory
- npm run build
- Try out in example OR use bundle.js in own project
Default settings assume all files are on the same server.
- ./example/index.html
This library is suitable for less used, older clients due to collecting logs from all users. Therefor, this library should be used in combination with polyfills. Example from polyfill.io:
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
``
Certain errors can not be caught such as type errors without using try catch blocks.
## Server
The server should be used merely for storage.
Do not want for anyone to send data to server endpoint so the following considerations should be made:
* limit single log size
* limit total stored log size
* single directory storage(avoids any bugs)
* fixed key passed when setting up server and received in code.
* session key
## License
MIT