( exportLog: Logger, message: string, flush: () => Promise<boolean>, )
| 1221 | } |
| 1222 | |
| 1223 | async function warnIfLogFlushFails( |
| 1224 | exportLog: Logger, |
| 1225 | message: string, |
| 1226 | flush: () => Promise<boolean>, |
| 1227 | ): Promise<void> { |
| 1228 | try { |
| 1229 | if (await flush()) return; |
| 1230 | exportLog.warn(message); |
| 1231 | } catch (error) { |
| 1232 | exportLog.warn(message, { error }); |
| 1233 | } |
| 1234 | try { |
| 1235 | await flush(); |
| 1236 | } catch {} |
| 1237 | } |
no test coverage detected