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

Add an AMD log module

    XMLWordPrintable

    Details

    • Testing Instructions:
      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
    • Affected Branches:
      MOODLE_29_STABLE
    • Fixed Branches:
      MOODLE_29_STABLE
    • Epic Link:
    • Pull Master Branch:
      MDL-49269-master

      Description

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

      https://github.com/pimterry/loglevel

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/May/15