| 9 | import {colorizeLevel, ctx} from './colors'; |
| 10 | import {LEVELS, LEVELS_MAP} from './constants'; |
| 11 | export interface LoggerOption { |
| 12 | level?: string; |
| 13 | filepath?: string; |
| 14 | rotate?: boolean; |
| 15 | nestedKey?: string; |
| 16 | outputFormat?: 'json' | 'colored'; |
| 17 | /** |
| 18 | * Set the debug level for specific child loggers |
| 19 | * */ |
| 20 | debugFilter?: string[]; |
| 21 | } |
| 22 | |
| 23 | function formatErrorString(err: unknown, stack = false): string { |
| 24 | if (err instanceof Error) { |
nothing calls this directly
no outgoing calls
no test coverage detected