(error: Error)
| 18 | * @returns The path of the generated log file. |
| 19 | */ |
| 20 | export function writeErrorToLogFile(error: Error): string { |
| 21 | if (!logPath) { |
| 22 | const tempDirectory = mkdtempSync(realpathSync(tmpdir()) + '/ng-'); |
| 23 | logPath = normalize(tempDirectory + '/angular-errors.log'); |
| 24 | } |
| 25 | |
| 26 | appendFileSync(logPath, '[error] ' + (error.stack || error) + '\n\n'); |
| 27 | |
| 28 | return logPath; |
| 29 | } |
no test coverage detected