Watchers are not only good for logging and counting, but they are also useful for debugging. If an agent or reference is not getting updated the way we expect, we can temporarily add a watcher to track what's happening so we can see what's going on.
For this recipe, we'll continue the theme we've been working with for the last few recipes. This time, instead of counting the data, the watch function will print the change of state to the console.
We'll use the dependencies and requirements that we did in the Monitoring processing with watchers recipe. For this recipe, we just need to add a two more functions to them.