The basic pattern behind monitoring, logging and debugging

The interceptor pattern underlies all these mechanisms. To get information about a certain control flow it needs to be intercepted and written into a log somehow. Depending on where the program flow is intercepted we know different levels of monitoring.