Switched to using JSONObject for serializing log messages to client.

(cherry picked from commit bc4a099bc859d87835a08b2fc416fcf9d78d153f)
Signed-off-by: Evan W. Patton <ewpatton@gmail.com>