ReviewOS

also looking at this

stacks/ts-audio

chore: change logger into stacksjs/clarity

#24
Merged cab-mikee wants to merge chore/enhance-logger into main
4 files +329 -624
src/utils.tsmodified+3-6
Changes to src/utils.ts
@@ -6,16 +6,14 @@ export function debugLog(category: string, message: string, verbose?: boolean |
66 }
77
88 if (verbose === true || config.verbose === true) {
9 // eslint-disable-next-line no-console
10 console.debug(`[audiox:${category}] ${message}`)
9 console.debug(message)
1110 }
1211
1312 if (Array.isArray(verbose)) {
1413 // Check if any of the verbose categories match the prefix
1514 const matches = verbose.some(prefix => category.startsWith(prefix))
1615 if (matches) {
17 // eslint-disable-next-line no-console
18 console.log(`[audiox:${category}] ${message}`)
16 console.log(message)
1917 }
2018 }
2119
@@ -23,8 +21,7 @@ export function debugLog(category: string, message: string, verbose?: boolean |
2321 // Check if any of the verbose categories match the prefix
2422 const matches = config.verbose.some(prefix => category.startsWith(prefix))
2523 if (matches) {
26 // eslint-disable-next-line no-console
27 console.log(`[audiox:${category}] ${message}`)
24 console.log(message)
2825 }
2926 }
3027}