Make logging work properly

Logging is now more sensisble and useful
And it works in the Admin UI and via cron