Robert Traill (Sermons from 1 Peter 1:1-4), Works 4:150:
You are never right at this work of praise unless you can praise in every condition. This was Job’s practice, chap. 1:21, The Lord hath given, and the Lord hath taken away, blessed be the name of the Lord. He could bless his name in giving and bless his name in taking away. He had the same thoughts of the name of God, whatsoever changes there were in his dispensations towards him. We understand a little how to bless the name of God when he gives. This is the common carnal frame of a great many Christians. If God gives, they know how to give thanks, though but poorly, God knows; but if God takes away, they know not how to thank him for taking, for smiting, for correcting, for afflicting. Oh! how few are there, if I may so say, such skilful musicians, as to make a song of praise on a sharp rod? How few are there who can sing in the stocks, who can praise God in the furnace, and bless his name whatever condition they are in? It hath been well said, and it holds true in several things, that those who cannot be contented in every condition will never be able to bless God, as they should do, in any. If God comes down to our humours, we can bless him; but if he takes his own wise way of dealing with us, how backward are we in this work of praise!
Source: https://www.puritanboard.com/threads/praise-in-every-condition.92645/, Comment 1