Logging

Logs should preferably be in JSON.