| 64 | } |
| 65 | |
| 66 | private isCategoryEnabled(category: LogCategories): boolean { |
| 67 | const parts = category.split('.'); |
| 68 | let partialCategory = ''; |
| 69 | |
| 70 | for (const part of parts) { |
| 71 | partialCategory += (partialCategory ? '.' : '') + part; |
| 72 | if (partialCategory in this.config) { |
| 73 | const value = this.config[partialCategory as LogCategories]; |
| 74 | if (typeof value === 'boolean') { |
| 75 | if (value === false) { |
| 76 | // console.log( |
| 77 | // `Category ${category} is false due to ${partialCategory}` |
| 78 | // ); |
| 79 | return false; |
| 80 | } |
| 81 | } |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | // console.log(`Category ${category} is true (default or explicitly set)`); |
| 86 | return true; |
| 87 | } |
| 88 | |
| 89 | private logValue( |
| 90 | category: string, |