(filePath)
| 13466 | return; |
| 13467 | } |
| 13468 | const removeCount = lines.length - limit; |
| 13469 | for (let i = 0; i < removeCount; i++) { |
| 13470 | lines[i].remove(); |
| 13471 | } |
| 13472 | } |
| 13473 | |
| 13474 | function getPwnLogLineClass(line = '') { |
| 13475 | const normalized = line.toLowerCase(); |
| 13476 | if (normalized.includes('error') || normalized.includes('failed') || normalized.includes('[err')) { |
| 13477 | return 'text-red-300'; |
| 13478 | } |
| 13479 | if (normalized.includes('warn')) { |
| 13480 | return 'text-yellow-200'; |
| 13481 | } |
| 13482 | if (normalized.includes('info') || normalized.includes('[info')) { |
| 13483 | return 'text-blue-200'; |
| 13484 | } |
| 13485 | return 'text-gray-200'; |
| 13486 | } |
| 13487 | |
| 13488 | function startPwnLogStreaming(options = {}) { |
| 13489 | const viewer = document.getElementById('pwn-log-viewer'); |
| 13490 | if (!viewer) { |
| 13491 | return; |
| 13492 | } |
| 13493 | if (pwnLogStreamTimer) { |
| 13494 | return; |
| 13495 | } |
| 13496 | if (pwnLogStopTimeout) { |
| 13497 | clearTimeout(pwnLogStopTimeout); |
| 13498 | pwnLogStopTimeout = null; |
| 13499 | } |
| 13500 | pwnLogStreaming = true; |
| 13501 | setPwnLogIndicator(true); |
| 13502 | fetchPwnLogs({ initial: Boolean(options.initial) || pwnLogCursor === 0, silent: true }); |
| 13503 | pwnLogStreamTimer = setInterval(() => fetchPwnLogs({ silent: true }), PWN_LOG_POLL_INTERVAL); |
| 13504 | } |
| 13505 |
nothing calls this directly
no test coverage detected