Initial alpha test of pywaggle log directory support!
If the environment variable `PYWAGGLE_LOG_DIR=path/to/dir` is defined, then pywaggle will publish measurements and uploads to `path/to/dir` as plain files in the following format:
txt
path/to/dir/
data.ndjson
uploads/
nstimestamp1-filename1
nstimestamp2-filename2
...
Messages are currently logged in `data.ndjson` in the following "raw", line separated JSON format:
json
{"name":"env.temperature","ts":1656449073603869000,"meta":{"sensor":"bme280"},"val":23.0}
{"name":"upload","ts":1656449073603976000,"meta":{"camera":"top","filename":"test.png.webp"},"val":"/Users/sean/git/pywaggle-log-dir-example/testrun/uploads/1656449073603976000-test.png.webp"}
{"name":"image.cats","ts":1656449074613277000,"meta":{},"val":0}
{"name":"image.birds","ts":1656449074613507000,"meta":{"camera":"left"},"val":8}
{"name":"timeit.inference","ts":1656449074613580000,"meta":{},"val":1005408000}
The log is flushed for each measurement, so piping the log and commands like `tail -f path/to/dir/data.ndjson` work as expected.