protected static function should_log() : bool {
        global $CFG;

        // Respect the config setting.
        if (isset($CFG->task_logmode) && empty($CFG->task_logmode)) {
            return false;
        }

        $loggerclass = self::get_logger_classname();
        if (empty($loggerclass)) {
            return false;
        }

        return $loggerclass::is_configured();
    }
protected static function should_log() : bool {
        global $CFG;

        // Respect the config setting.
        if (isset($CFG->task_logmode) && empty($CFG->task_logmode)) {
            return false;
        }

        $loggerclass = self::get_logger_classname();
        if (empty($loggerclass)) {
            return false;
        }

        return $loggerclass::is_configured();
    }
protected static function should_log ( ) : bool { global $ CFG ; // Respect the config setting. if ( isset ( $ CFG -> task_logmode ) && empty ( $ CFG -> task_logmode ) ) { return false ; } $ loggerclass = self :: get_logger_classname ( ) ; if ( empty ( $ loggerclass ) ) { return false ; } return $ loggerclass :: is_configured ( ) ; }
Whether logging is possible and should be happening.

@return  bool
Whether logging is possible and should be happening .