Al-Muzanni reported: Imam al-Shafi’i, may Allah have mercy on him, said, “Whoever admonishes his brother in private has been sincere to him and protected his reputation. Whoever admonishes him in public has humiliated him and betrayed him.”
Source: Ḥilyat al-Awliyā’ 9/140
عَنْ الْمُزَنِيِّ قَالَ الشَّافِعِيُّ رَحِمَهُ اللهُ مَنْ وَعَظَ أَخَاهُ سِرًّا فَقَدْ نَصَحَهُ وَزَانَهُ وَمَنْ وَعَظَهُ عَلانِيَةً فَقَدْ فَضَحَهُ وَخَانَهُ
9/140 حلية الأولياء لأبي نعيم الإمام الشافعي