Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

bbblogger.js 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /**
  2. * BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
  3. *
  4. * Copyright (c) 2018 BigBlueButton Inc. and by respective authors (see below).
  5. *
  6. * This program is free software; you can redistribute it and/or modify it under the
  7. * terms of the GNU Lesser General Public License as published by the Free Software
  8. * Foundation; either version 3.0 of the License, or (at your option) any later
  9. * version.
  10. *
  11. * BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
  12. * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  13. * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU Lesser General Public License along
  16. * with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
  17. *
  18. */
  19. (function(window, undefined) {
  20. var BBBLogger = {};
  21. BBBLogger.error = function() {
  22. return Function.prototype.bind.call(console.error);
  23. }();
  24. BBBLogger.warn = function() {
  25. return Function.prototype.bind.call(console.warn);
  26. }();
  27. BBBLogger.info = function() {
  28. return Function.prototype.bind.call(console.info);
  29. }();
  30. BBBLogger.debug = function() {};
  31. BBBLogger.level = function(level) {
  32. if (level == "debug") {
  33. BBBLogger.debug = function() {
  34. return Function.prototype.bind.call(console.debug);
  35. }();
  36. } else {
  37. BBBLogger.debug = function() {
  38. return function() {};
  39. }();
  40. }
  41. }
  42. BBBLogger.level("info");
  43. window.Logger = BBBLogger;
  44. })(this);