Victor Hugo said this quote

Well, listen a moment, Monsieur Mayor; I have often been severe in my life towards others. It was just. I did right. Now if I were not severe towards myself, all I have justly done would become injustice. Should I spare myself more than others? No. What! if I should be prompt only to punish others and not myself, I should be a wretched indeed! - Javert to M. Madeleine