change for-in to foreach in overrideLogMethodColors method