Show notification that a logic hook triggered

I need to show a notification that some fields were automatically updated by a logic hook.

When saving an account or contact, it checks for certain flags to be set across all contacts. If it is the only contact attached to an account, the flags get set automatically.

This behaviour is sometimes unexpected when in the contact view, because the flags get set on save, but the reason is not obvious. How do I show a popup notification (similar to error/success messages) when the flags have been set?