    addLogEntry(entry.time, entry.method, entry.endpoint, entry.status, entry.duration, entry.requestOptions);
        });

        // Handle heartbeat to keep connection alive
        logSource.addEventListener('heartbeat', (event) => {
          console.log('Received heartbeat');
        });

        logSource.onerror = (error) => {
          console.error('SSE error (logs):', error);
          reconnectLogSource();
        };
      }

      function cleanupLogSource() {
        if (logSource) {
         