How would you like to track this information? For example, is it sufficient to be a message in a log file, a performance counter? Do you want to maintain the history of all the changes you want on this flag? This will help us understand how to implement it.
This is a desired feature especially while working in a GMP environment and a PI System that is also used for GxP.