Read the log from the administration area #49

Closed
opened 2026-09-06 15:46:46 +00:00 by tiagoagueda · 0 comments
Owner

Observation

able to see logs from admin interface

Why

When something goes wrong on a self-hosted instance — a notifier that will not send, a
store that refuses a document, a capture that fails — the answer is in the log, and getting
to it today means docker logs and a shell. The person administering a Postulo instance is
usually the person using it, and often on a phone.

What exists today

LOGGING in config/settings/base.py writes one formatted line per record to the console
at POSTULO_LOG_LEVEL. Nothing is kept, so there is nothing for a page to read.

Shape

  1. Something to read back. A rotating file under the data volume, capped by size and
    count (POSTULO_LOG_DIR, default beside the media), with the console handler left
    exactly as it is so docker logs keeps working.
  2. Structured records: one JSON object per line — time, level, logger, message, and
    whatever extras the record carried. A page can then filter by level and by logger
    without parsing prose, and #51 has something to serve.
  3. Server settings → Logs: the most recent records, newest first, with a level
    filter, a logger filter and a search box; and a link straight to it from the plugin and
    connection pages when something there has failed, which is when anybody wants it.
  4. What must never be in there. A log is not a place for somebody's documents. The page
    is for administrators only and says at the top that records may name people, companies
    and applications — and as part of this, an audit that nothing in Postulo logs a
    document's contents in the first place.

Classification

Enhancement. Not breaking: the console keeps receiving everything it receives now.

Depends on

Nothing. #51 depends on this.

Open questions

  1. How much is kept? Proposal: about 5 MB across three files — days on a personal instance,
    bounded on a busy one.
  2. May the file be downloaded? Useful in a bug report, and the same warning applies to it.
## Observation > able to see logs from admin interface ## Why When something goes wrong on a self-hosted instance — a notifier that will not send, a store that refuses a document, a capture that fails — the answer is in the log, and getting to it today means `docker logs` and a shell. The person administering a Postulo instance is usually the person using it, and often on a phone. ## What exists today `LOGGING` in `config/settings/base.py` writes one formatted line per record to the console at `POSTULO_LOG_LEVEL`. Nothing is kept, so there is nothing for a page to read. ## Shape 1. **Something to read back.** A rotating file under the data volume, capped by size and count (`POSTULO_LOG_DIR`, default beside the media), with the console handler left exactly as it is so `docker logs` keeps working. 2. **Structured records**: one JSON object per line — time, level, logger, message, and whatever extras the record carried. A page can then filter by level and by logger without parsing prose, and #51 has something to serve. 3. ***Server settings → Logs***: the most recent records, newest first, with a level filter, a logger filter and a search box; and a link straight to it from the plugin and connection pages when something there has failed, which is when anybody wants it. 4. **What must never be in there.** A log is not a place for somebody's documents. The page is for administrators only and says at the top that records may name people, companies and applications — and as part of this, an audit that nothing in Postulo logs a document's contents in the first place. ## Classification Enhancement. Not breaking: the console keeps receiving everything it receives now. ## Depends on Nothing. #51 depends on this. ## Open questions 1. How much is kept? Proposal: about 5 MB across three files — days on a personal instance, bounded on a busy one. 2. May the file be downloaded? Useful in a bug report, and the same warning applies to it.
tiagoagueda added this to the 0.2.0 milestone 2026-09-06 15:46:46 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Postulo/postulo#49
No description provided.