added formatting option for console logging