Partially revert previous commit for logging and fix it.

The previous patch did not take different storage backends into account,
or different tile path locations.