Converted logging to new format