MCPcopy Index your code
hub / github.com/CommandCodeAI/BaseAI / isCategoryEnabled

Method isCategoryEnabled

packages/baseai/src/utils/logger.ts:66–87  ·  view source on GitHub ↗
(category: LogCategories)

Source from the content-addressed store, hash-verified

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,

Callers 1

logMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected