Logging

Addresses https://bugs.launchpad.net/openquake/+bug/1081942