I use the following line:
curl -X POST -H "Content-Type: application/json" --no-buffer --data '{"follow":true,"all":true,"format":"short"}' "$BALENA_SUPERVISOR_ADDRESS/v2/journal-logs?apikey=$BALENA_SUPERVISOR_API_KEY" | /usr/sbin/tinylog -k 10 -s 10000000 "${LOG_PATH}"
Which pipes text + coloring ascii to file. Does not matter if I use cat, less, vi, nano. I get the noisy coloring ascii text.
If I use the following on device console:
curl -X POST -H "Content-Type: application/json" --no-buffer --data '{"follow":true,"all":true,"format":"short"}' "$BALENA_SUPERVISOR_ADDRESS/v2/journal-logs?apikey=$BALENA_SUPERVISOR_API_KEY"
I get all output, but the tty parses the coloring ascii and produce the actual colors, hence producing the correct text.
The use case is that I would like to log without coloring via the superviser endpoint.