The root logger previously had no handler at all, so every module's logger.info() call (user creation, claims, password resets, ...) was silently dropped, not just unviewable. Adds a RotatingFileHandler writing into the existing /data volume so log content also survives container restarts/redeploys, plus /admin/logs (tail + line-count picker + full-file download) alongside the existing Users & Frames admin page.
31 lines
1.2 KiB
HTML
31 lines
1.2 KiB
HTML
{% extends "app_base.html" %}
|
|
|
|
{% block title %}Server Logs{% endblock %}
|
|
{% block page_title %}Administration{% endblock %}
|
|
|
|
{% block content %}
|
|
{% include "_admin_tabs.html" %}
|
|
|
|
<section class="card">
|
|
<div class="card-title-row">
|
|
<h2 class="card-title">Server Logs</h2>
|
|
<a href="/admin/logs/download" class="secondary btn-inline">Download full log</a>
|
|
</div>
|
|
|
|
{% if not log_exists %}
|
|
<p class="sub">No log file yet -- nothing has been logged since this server last started.</p>
|
|
{% else %}
|
|
<p class="sub">Last {{ log_lines }} lines of <code>{{ log_path }}</code>. Rotates at ~2MB
|
|
(older entries roll into <code>{{ log_path }}.1</code>, etc. -- not shown here; use
|
|
"Download full log" for just the current file).</p>
|
|
<div class="log-view-controls">
|
|
{% for n in [200, 500, 2000, 5000] %}
|
|
<a href="/admin/logs?lines={{ n }}" class="{% if log_lines == n %}active{% endif %}">{{ n }}</a>
|
|
{% endfor %}
|
|
<a href="/admin/logs?lines={{ log_lines }}" class="secondary btn-inline">Refresh</a>
|
|
</div>
|
|
<pre class="log-view">{{ log_text }}</pre>
|
|
{% endif %}
|
|
</section>
|
|
{% endblock %}
|