Function
shouldOutput
(
logLevel: string,
targetLevel: string = 'warn',
bizName: string,
targetBizName: string,
)
Source from the content-addressed store, hash-verified
| 76 | const bizNameColorConfig: Record<string, string> = {}; |
| 77 | |
| 78 | const shouldOutput = ( |
| 79 | logLevel: string, |
| 80 | targetLevel: string = 'warn', |
| 81 | bizName: string, |
| 82 | targetBizName: string, |
| 83 | ): boolean => { |
| 84 | const isLevelFit = (levels as any)[targetLevel] <= (levels as any)[logLevel]; |
| 85 | const isBizNameFit = targetBizName === '*' || bizName.indexOf(targetBizName) > -1; |
| 86 | return isLevelFit && isBizNameFit; |
| 87 | }; |
| 88 | |
| 89 | const output = (logLevel: string, bizName: string) => { |
| 90 | return (...args: any[]) => { |
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…