Skip to content

Commit

Permalink
Merge pull request #141 from nadavkav/patch-2
Browse files Browse the repository at this point in the history
Bind Moodle $CFG->debug to $loggingenabled
  • Loading branch information
ryasmi authored Oct 6, 2017
2 parents 6d58d89 + f2a8338 commit 905d9fd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions classes/log/store.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

/**
Expand Down

0 comments on commit 905d9fd

Please sign in to comment.