diff --git a/src/lib/status-manager.ts b/src/lib/status-manager.ts index a1490ab..e282c36 100644 --- a/src/lib/status-manager.ts +++ b/src/lib/status-manager.ts @@ -138,7 +138,11 @@ export class StatusManager { }); unSuccessfulResults.forEach(({ target, result }) => { - logger.warn(`IPv${ipVersion} ping test unsuccessful for ${target}: ${result.stats?.loss?.toString() || ''}% packet loss${testPassText}.`); + if (result.stats?.loss) { + logger.warn(`IPv${ipVersion} ping test unsuccessful for ${target}: ${result.stats.loss.toString()}% packet loss${testPassText}.`, { result }); + } else { + logger.warn(`IPv${ipVersion} ping test unsuccessful for ${target}: ${testPassText}.`, { result }); + } }); if (!isPassingTest) {