diff --git a/classes/log/store.php b/classes/log/store.php
index 039b55cf49110336cae7c3484c690b91045693b8..7d2630cc8fce4d2d9ca93cb99c8b02ef7dc55660 100644
--- a/classes/log/store.php
+++ b/classes/log/store.php
@@ -65,10 +65,14 @@ class store extends php_obj implements log_writer {
      * @param log_manager $manager
      */
     public function __construct(log_manager $manager) {
+        global $CFG;
         $this->helper_setup($manager);
         $this->logguests = $this->get_config('logguests', 1);
         $routes = $this->get_config('routes', '');
         $this->routes = $routes === '' ? [] : explode(',', $routes);
+        if (!empty($CFG->debug) and $CFG->debug >= DEBUG_DEVELOPER) {
+            $this->loggingenabled = true;
+        }
     }
 
     /**