It doesn't matter what it's about: your family, your job, a flat tire, an injury, politics, etc. Complaining - at all, about anything - is an affront to God. If that seems far-fetched to you, then hear me out. I've come prepared with support from Scripture. (And don't think I'm on a high horse here; in fact, I complain as much as anyone. With God's mercy I'll get it under control.)
And they took their journey from Elim, and all the congregation of the children of Israel came unto the wilderness of Sin, which is between Elim and Sinai, on the fifteenth day of the second month after their departing out of the land of Egypt. And the whole congregation of the children of Israel murmured against Moses and Aaron in the wilderness: and the children of Israel said unto them, Would to God we had died by the hand of the Lord in the land of Egypt, when we sat by the flesh pots, and when we did eat bread to the full; for ye have brought us forth into this wilderness, to kill this whole assembly with hunger.
The time: summer, circa 1400 B.C. The setting: the wilderness of Sin. God in his power has rescued the Israelites from the house of bondage, miraculously leading them through the Red Sea upon dry land. He has appeared to them in a pillar of cloud by day and a pillar of fire by night, guiding them to the land he swore to their forefather Abraham centuries before.
But all is not well with God's people. Wandering in the wilderness is no easy life. In Exodus 16:1-3, we see that the people begin to murmur against Moses and Aaron. (In other words, they begin complaining about them.) "Why have you two led us all the way out here? There's nothing to eat! We literally had a better standard of living when we were slaves in Egypt! etc." They basically go so far as to accuse Moses and Aaron of bringing them out of Egypt specifically to kill them by starvation.
Then said the Lord unto Moses, Behold, I will rain bread from heaven for you; and the people shall go out and gather a certain rate every day, that I may prove them, whether they will walk in my law, or no. And it shall come to pass, that on the sixth day they shall prepare that which they bring in; and it shall be twice as much as they gather daily. And Moses and Aaron said unto all the children of Israel, At even, then ye shall know that the LORD hath brought you out from the land of Egypt: and in the morning, then ye shall see the glory of the LORD; for that he heareth your murmurings against the LORD: and what are we, that ye murmur against us? And Moses said, This shall be, when the LORD shall give you in the evening flesh to eat, and in the morning bread to the full; for that the LORD heareth your murmurings which ye murmur against him: and what are we? your murmurings are not against us, but against the LORD.
Despite the people's unbelief (for there can be no other root cause of complaining), God promises to feed them bread (manna) from heaven! The people will be able to gather what they need for each day - but no more - and two days' worth on Friday so they won't have to work on the Sabbath. These facts are rich in theological meaning, but that's a subject for another discussion. In the meantime, I invite you to look again at verse 16:8:
And Moses said, This shall be, when the LORD shall give you in the evening flesh to eat, and in the morning bread to the full; for that the LORD heareth your murmurings which ye murmur against him: and what are we? your murmurings are not against us, but against the LORD.
Here Moses claims that, while they appear to merely be complaining about their leaders, the people of Israel are really complaining against the LORD himself. How can this be?
When you complain about your circumstances, you are effectively claiming that when God sovereignly ordered your life, he didn't do it right. You're saying that, if you had been in his place, you'd have done it better. By the mere act of complaining, you have made God's wisdom out to be deficient and you have dangerously elevated your own opinion to the level of moral "ought" (as in, "things ought to be the way I want them to be!") In this way, whenever you are murmuring against your circumstances - even your enemies or your country's leaders - you are really murmuring against God. (There is a difference between complaining and simply pointing out that things are wrong. The latter deals in the realm of facts and can be done dispassionately while still giving glory to God. The former can only be done sinfully.)
So, it seems to me that every moral statement you make about the world is ultimately theological. If you resolve to meet the circumstances of your life without fear, you display trust in God's plan and a willingness to obey him in the midst of difficulty. If you instead choose to wallow in despair, you are communicating a lack of faith in his ability to order and provide.
What is the antidote to complaining? I find it helpful to dwell on our Lord's advice concerning the necessities of life:
Therefore I say unto you, Take no thought for your life, what ye shall eat, or what ye shall drink; nor yet for your body, what ye shall put on. Is not the life more than meat, and the body than raiment? Behold the fowls of the air: for they sow not, neither do they reap, nor gather into barns; yet your heavenly Father feedeth them. Are ye not much better than they? Which of you by taking thought can add one cubit unto his stature? And why take ye thought for raiment? Consider the lilies of the field, how they grow; they toil not, neither do they spin: and yet I say unto you, That even Solomon in all his glory was not arrayed like one of these. Wherefore, if God so clothe the grass of the field, which to day is, and to morrow is cast into the oven, shall he not much more clothe you, O ye of little faith? Therefore take no thought, saying, What shall we eat? or, What shall we drink? or, Wherewithal shall we be clothed? (For after all these things do the Gentiles seek:) for your heavenly Father knoweth that ye have need of all these things. But seek ye first the kingdom of God, and his righteousness; and all these things shall be added unto you. Take therefore no thought for the morrow: for the morrow shall take thought for the things of itself. Sufficient unto the day is the evil thereof.