{ minTs = undefined maxTs = undefined allLogs = undefined getAllLogs(minTsManual, maxTsManual) }} serviceLogsChoices loadText="Last 1000 logfiles" />
0' }} on:change={() => { allLogs = undefined getAllLogs(minTs, maxTs) }} /> { if (e.detail) { getAllLogs(maxTs, undefined) } else { timeout && clearTimeout(timeout) } }} options={{ right: 'auto-refresh' }} />
{#if allLogs == undefined}
{:else if Object.keys(allLogs).length == 0}
No logs
{:else if minTs && maxTs} {@const minTsN = new Date(minTs).getTime()} {@const maxTsN = new Date(maxTs).getTime()} {@const diff = maxTsN - minTsN}
{new Date(minTs).toLocaleTimeString([], { day: '2-digit', month: '2-digit', hour: '2-digit', minute: '2-digit' })}
{new Date(maxTs).toLocaleTimeString([], { day: '2-digit', month: '2-digit', hour: '2-digit', minute: '2-digit' })}
{#each Object.entries(allLogs) as [mode, o1]}

{mode}s

{#each Object.entries(o1) as [wg, o2]}
{#if wg && wg != ''}

{wg}

{/if}
{#each Object.entries(o2) as [hn, files]}
{ selected = [mode, wg, hn] upToIsLatest = true upTo = getLatestUpTo(selected) scrollToBottom() }} >
{truncateRev(hn, 8)}
{#each files as file} {@const okHeight = 100.0 * ((file.ok_lines * 1.0) / (max_lines ?? 1))} {@const errHeight = 100.0 * ((file.err_lines * 1.0) / (max_lines ?? 1))}
{/each}
{/each}
{/each}
{/each} {/if}
1 min delay: logs are compacted before being available
{#if selected}
{#each getLogs(selected, upTo) as file}
{new Date(file.ts).toLocaleTimeString([], { day: '2-digit', month: '2-digit', hour: '2-digit', minute: '2-digit' })}
{#if logsContent[file.file_path] == undefined}
{:else if logsContent[file.file_path]} {#if logsContent[file.file_path].error} {#if logsContent[file.file_path].error?.startsWith('Not Found')}
Log file is missing. Log files require a shared log volume to be mounted across servers and workers or to use the EE S3/object storage integration for logs. To avoid mounting a shared volume, set the EE object store logs in the instance settings
{:else}
{logsContent[file.file_path].error}
{/if} {:else if logsContent[file.file_path].content}
{:else}
No logs
{/if} {/if}
{/each}
Last 5 log files up to:
{#if upTo} {:else}
{/if}
{#if upTo} {:else}
{/if}
{:else}
Select a host to see its logs
{/if}