Logically if his intention is wrong by sending such messges which he want used as proof then yes its bad but proving this is not so easy but if he thought you are doing some wrong and he installed software to track whatsapp messge and he got something then can not say its not easy to conclude a solution until whole story comes in front.
but still its not good what he did.