Imam al-shafi’i رحمه الله (d. 204 AH) said:

“To admonish your brother in private is to advise him and improve him. But to admonish him publicly is to disgrace and shame him.”

Hilyah Al-Awliya 9/140