Major modification to the logg handling.