Details
-
Improvement
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
Description
The --logdest option is described like this:
A path ending with '.json' will receive structured output in JSON format. The log file will not have an ending ']' automatically written to it due to the appending nature of logging. It must be appended manually to make the content valid JSON.
https://puppet.com/docs/puppet/5.5/man/agent.html
Instead of writing out invalid JSON that must be manually accounted for, we should write out newline-delimited JSON. There are libraries that can work with this file format rather than needing to manually account for the closing ] each time you work with it.