Total Complexity | 3 |
Complexity/F | 3 |
Lines of Code | 15 |
Function Count | 1 |
Duplicated Lines | 0 |
Ratio | 0 % |
Coverage | 100% |
Changes | 0 |
1 | import { logger } from '@/core'; |
||
2 | import Logger from '@/logging/Logger'; |
||
3 | |||
4 | /** |
||
5 | * Initializes a Logger with a specified prefix message |
||
6 | * @decorator |
||
7 | * @param scope {string} |
||
8 | */ |
||
9 | export function InjectLogger(scope?: string) { |
||
10 | 2 | return (_value: any, _context: ClassFieldDecoratorContext) => () => { |
|
11 | 3 | logger.debug(`initializing ${scope ?? 'anonymous'} logger`); |
|
12 | 3 | return Logger(scope); |
|
13 | }; |
||
14 | } |
||
15 |