Everyone needs to talk their friends. It's how you vent the small stuff.
Who hasn't called their partner a knob/nightmare. I share a lot with a couple of trusted friends. So what? I mean we end up in situations all talking deeply about oh all sorts of deep personal things, between males and females, about sex, emotions, fears, loves, niggles.
Just own it.
No one really cares. If you make him happy most of the time that is all his mate will care about. Or should care about.
You can't, and shouldn't want to police his conversations with his friends. Talking is ok. Talking about personal important stuff is ok.
I reckon my husband's best mate know more about me than best mate's lovely wife does and I tell her most things, do they swap notes? Oh I don't know or care.
Basically we all know each other intimately and our lives are all the better for doing so.
Or get cross, tell him you have seen the messages, instruct him on what he can and can't talk about and make everyone feel guilty and awkward.
Or hold back in future, if he asks what's wrong just tell him you feel your private conversations aren't private. And you talk about private stuff with friends you can trust.
They are the options I can see.