()
| 20027 | function createConsoleEntryFromLog(logLine) { |
| 20028 | const type = determineConsoleLogType(logLine); |
| 20029 | return { |
| 20030 | timestamp: extractLogTimestamp(logLine), |
| 20031 | message: logLine, |
| 20032 | type, |
| 20033 | colorClass: HISTORY_LOG_TYPE_COLORS[type] || HISTORY_LOG_TYPE_COLORS['info'] |
| 20034 | }; |
| 20035 | } |
| 20036 | |
| 20037 | function updateConsole(logs) { |
| 20038 | if (!logs || !Array.isArray(logs)) { |
| 20039 | // If no logs available, add informational messages |
| 20040 | if (consoleBuffer.length === 0) { |
| 20041 | addConsoleMessage('No historical logs available', 'warning'); |
| 20042 | addConsoleMessage('New activity will appear here as it occurs', 'info'); |
| 20043 | } |
| 20044 | return; |
| 20045 | } |
| 20046 | |
| 20047 | // If logs are empty array, provide user feedback |
| 20048 | if (logs.length === 0) { |
| 20049 | if (consoleBuffer.length === 0) { |
| 20050 | addConsoleMessage('No recent activity logged', 'info'); |
| 20051 | addConsoleMessage('Waiting for new events...', 'info'); |
| 20052 | } |
| 20053 | return; |
| 20054 | } |
nothing calls this directly
no test coverage detected