chunk-GBKXY6BH.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. import {createRequire as __cjsCompatRequire} from 'module';
  2. const require = __cjsCompatRequire(import.meta.url);
  3. // bazel-out/darwin_arm64-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_arm64-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. level;
  21. constructor(level) {
  22. this.level = level;
  23. }
  24. debug(...args) {
  25. if (this.level <= LogLevel.debug)
  26. console.debug(DEBUG, ...args);
  27. }
  28. info(...args) {
  29. if (this.level <= LogLevel.info)
  30. console.info(...args);
  31. }
  32. warn(...args) {
  33. if (this.level <= LogLevel.warn)
  34. console.warn(WARN, ...args);
  35. }
  36. error(...args) {
  37. if (this.level <= LogLevel.error)
  38. console.error(ERROR, ...args);
  39. }
  40. };
  41. export {
  42. LogLevel,
  43. ConsoleLogger
  44. };
  45. /**
  46. * @license
  47. * Copyright Google LLC All Rights Reserved.
  48. *
  49. * Use of this source code is governed by an MIT-style license that can be
  50. * found in the LICENSE file at https://angular.dev/license
  51. */
  52. //# sourceMappingURL=chunk-GBKXY6BH.js.map