Major logging overhaul