This service adds a log entry to a log JSON document. That will allow to serve
an up-to-date all.json file pending a more robust microservice (see rSERVERSLOG).
Details
Details
- Reviewers
dereckson - Commits
- rAPISRVLOGS738d7478ff78: Initial revision
Unit tests provided for the Log class.
Furthermore, a test client in TCL has been prepared to test also the adder code.
Diff Detail
Diff Detail
- Repository
- rAPISRVLOGS Servers log :: Add new entries API
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
Client code used to test this code
- Prepare a dict with required information, e.g. [list date 1974 emitter Tests source LogTest.php component Acme entry "Something happens."]
- Use dict2json (provided below) to convert it into a JSON payload
- Use rest or http package to post to the API entry point
proc dict2json {dictToEncode} { ::json::write object {*}[dict map {k v} $dictToEncode { set v [::json::write string $v] }] }