1
0
mirror of https://github.com/moodle/moodle.git synced 2025-05-12 11:15:49 +02:00
Ferran Recio 771f183646
MDL-79061 core: Mechanism for logging mutation feedbacks
* Create a mechanism for logging mutation feedbacks.
* The mutation feedbacks are displayed as a toast by default.
* Apply this logging mechanism on the course homepage to provide
feedback for the results of actions performed on course modules and
course sections.
2023-12-05 11:19:30 +08:00

17 lines
892 B
JavaScript

define("core/local/reactive/logger",["exports","core/toast"],(function(_exports,_toast){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0;return _exports.default=
/**
* Default reactive mutations logger class.
*
* This logger is used by default by the StateManager to log mutation feedbacks
* and actions. By default, feedbacks will be displayed as a toast. However, the
* reactive instance can provide alternative loggers to provide advanced logging
* capabilities.
*
* @module core/local/reactive/logger
* @class Logger
* @copyright 2023 Ferran Recio <ferran@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class{constructor(){this._debug=!1}add(entry){entry.feedbackMessage&&(0,_toast.add)(entry.feedbackMessage)}},_exports.default}));
//# sourceMappingURL=logger.min.js.map