chunk-CF2CT7RQ.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. import {createRequire as __cjsCompatRequire} from 'module';
  2. const require = __cjsCompatRequire(import.meta.url);
  3. // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/logging/src/logger.mjs
  4. var LogLevel;
  5. (function(LogLevel2) {
  6. LogLevel2[LogLevel2["debug"] = 0] = "debug";
  7. LogLevel2[LogLevel2["info"] = 1] = "info";
  8. LogLevel2[LogLevel2["warn"] = 2] = "warn";
  9. LogLevel2[LogLevel2["error"] = 3] = "error";
  10. })(LogLevel || (LogLevel = {}));
  11. // bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/logging/src/console_logger.mjs
  12. var RESET = "\x1B[0m";
  13. var RED = "\x1B[31m";
  14. var YELLOW = "\x1B[33m";
  15. var BLUE = "\x1B[36m";
  16. var DEBUG = `${BLUE}Debug:${RESET}`;
  17. var WARN = `${YELLOW}Warning:${RESET}`;
  18. var ERROR = `${RED}Error:${RESET}`;
  19. var ConsoleLogger = class {
  20. constructor(level) {
  21. this.level = level;
  22. }
  23. debug(...args) {
  24. if (this.level <= LogLevel.debug)
  25. console.debug(DEBUG, ...args);
  26. }
  27. info(...args) {
  28. if (this.level <= LogLevel.info)
  29. console.info(...args);
  30. }
  31. warn(...args) {
  32. if (this.level <= LogLevel.warn)
  33. console.warn(WARN, ...args);
  34. }
  35. error(...args) {
  36. if (this.level <= LogLevel.error)
  37. console.error(ERROR, ...args);
  38. }
  39. };
  40. export {
  41. LogLevel,
  42. ConsoleLogger
  43. };
  44. /**
  45. * @license
  46. * Copyright Google LLC All Rights Reserved.
  47. *
  48. * Use of this source code is governed by an MIT-style license that can be
  49. * found in the LICENSE file at https://angular.io/license
  50. */
  51. //# sourceMappingURL=chunk-CF2CT7RQ.js.map