Getting a lot of spam with this message but no idea what spell or why. If this message could get the spell name added it would be helpful. And maybe the option to filter this message off since it doesn't seem to be at all useful ? e.g. Bob tries to cast a spell on you, but you are protected [by x]. [Spell name here] or Bob tries to cast [spell name here] on you, but you are protected [by x].
Yes, it would be good to see the spell name. There are two scenarios I know of that will cause this message. 1) Bob has you targeted when casting detrimental spells. 2) Bob is casting detrimental AE spells (maybe only PBAE do this) in your area and is not grouped with you. If Bob is in a different group but in the same raid as you, I don't know if you'll get this message.
You would think that if Bob was attempting to cast a spell that had no chance of actually landing, e.g. a group only spell when you are not in his group, then only Bob should get the message.
I'm grasping to think of a situation at the moment just based on the info above, but there probably is likely a reasonable explanation as to why a player should be able to see this feedback, for a certain scenario. Could be an antiquated reason, and it's just log spam at this point.