Correct formatting of output in log files

Use JSON_PRETTY_PRINT instead of true as the second argument to json_encode()