Skip to content
Snippets Groups Projects
Commit 905d9fd6 authored by Ryan Smith's avatar Ryan Smith Committed by GitHub
Browse files

Merge pull request #141 from nadavkav/patch-2

Bind Moodle $CFG->debug to $loggingenabled
parents 6d58d899 f2a83388
No related branches found
No related tags found
No related merge requests found
...@@ -65,10 +65,14 @@ class store extends php_obj implements log_writer { ...@@ -65,10 +65,14 @@ class store extends php_obj implements log_writer {
* @param log_manager $manager * @param log_manager $manager
*/ */
public function __construct(log_manager $manager) { public function __construct(log_manager $manager) {
global $CFG;
$this->helper_setup($manager); $this->helper_setup($manager);
$this->logguests = $this->get_config('logguests', 1); $this->logguests = $this->get_config('logguests', 1);
$routes = $this->get_config('routes', ''); $routes = $this->get_config('routes', '');
$this->routes = $routes === '' ? [] : explode(',', $routes); $this->routes = $routes === '' ? [] : explode(',', $routes);
if (!empty($CFG->debug) and $CFG->debug >= DEBUG_DEVELOPER) {
$this->loggingenabled = true;
}
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment