Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-49269

Add an AMD log module

    XMLWordPrintable

Details

    • MOODLE_29_STABLE
    • MOODLE_29_STABLE
    • MDL-49269-master
    • Hide
      1. Edit index.php, at the bottom, add:

        echo <<<EOF
        <script>
        require(['core/log'], function(log) {
            log.trace('foo', 'bar');
            log.debug('foo', 'bar');
            log.info('foo', 'bar');
            log.warn('foo', 'bar');
            log.error('foo', 'bar');
        });
        </script>
        EOF;
        

      2. Toggle the value of debugdeveloper and refresh in between:
        1. When it's enabled, Confirm that you see all five levels
        2. When it's disabled, Confirm that you only see error, and warn
      Show
      Edit index.php, at the bottom, add: echo <<<EOF <script> require(['core/log'], function(log) { log.trace('foo', 'bar'); log.debug('foo', 'bar'); log.info('foo', 'bar'); log.warn('foo', 'bar'); log.error('foo', 'bar'); }); </script> EOF; Toggle the value of debugdeveloper and refresh in between: When it's enabled, Confirm that you see all five levels When it's disabled, Confirm that you only see error, and warn

    Description

      We could wrap Y.log for now - but I like this look of this:

      https://github.com/pimterry/loglevel

      Attachments

        Activity

          People

            dobedobedoh Andrew Lyons
            damyon Damyon Wiese
            Damyon Wiese Damyon Wiese
            David Monllaó David Monllaó
            Rajesh Taneja Rajesh Taneja
            David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              11/May/15