I noticed you use the inbuilt debugging() calls in quite intensive way to track the actual code flow of your plugin. Note that this is not common in Moodle. Even with the debugging level set to the maximum developer level, Moodle related code calls debugging() mostly in case there are some unexpected things happening that need to be debugged.
I do understand your reasoning to be able to monitor the actual work of your plugin. This might be achieved by introducing a plugin level constant like ATTO_WORDIMPORT_VERBOSE_DEBUG or so. If that is set to 1 (with 0 being default), only then it would use debugging() to track the code flow.
I noticed you use the inbuilt
debugging()
calls in quite intensive way to track the actual code flow of your plugin. Note that this is not common in Moodle. Even with the debugging level set to the maximum developer level, Moodle related code callsdebugging()
mostly in case there are some unexpected things happening that need to be debugged.I do understand your reasoning to be able to monitor the actual work of your plugin. This might be achieved by introducing a plugin level constant like
ATTO_WORDIMPORT_VERBOSE_DEBUG
or so. If that is set to 1 (with 0 being default), only then it would usedebugging()
to track the code flow.