add logging capability to job runs

The job errors now are logged to the logging table.
:shipit: