(stage, err)
| 54 | } |
| 55 | |
| 56 | function logError(stage, err) { |
| 57 | const error = err instanceof Error |
| 58 | ? { message: err.message, stack: err.stack } |
| 59 | : String(err); |
| 60 | writeLine(logPath, { ts: localISO(), hook: hookName, stage, error }); |
| 61 | } |
| 62 | |
| 63 | return { log, logError }; |
| 64 | } |
no test coverage detected