tls log: add JSON output

This patch adds a new json option to tls logging. If set to yes, it
output TLS logging information in JSON format.