chore(chatlog): disable background message file logging (stage 1) #127

Manually merged
jabber.developer2 merged 1 commits from chore/remove-chatlog-stage-1 into master 2026-05-20 11:41:23 +00:00
Collaborator

Summary

Stage 1 of removing the chatlog subsystem that wrote plain-text per-day message logs to $XDG_DATA_HOME/profanity/chatlogs/<account>/<other>/YYYY_MM_DD.log (and chatlogs/<account>/rooms/... for MUCs). These files were never read back by Profanity — history replay in src/ui/chatwin.c reads from the database via log_database_get_previous_chat, not from these files — so the feature only ever wrote to disk for users to inspect with external tools.

This change reduces src/chatlog.c to no-op stubs while preserving all 12 public signatures. The ~20 call sites in src/event/, src/otr/otr.c and src/profanity.c continue to compile and link unchanged.

What changes for users

  • chatlogs/ directory is no longer created or written to.
  • Existing chatlogs/ data on disk is left untouched (users may delete it manually).
  • /logging, /otr log, /pgp log, /omemo log, /ox log and the related preferences (chlog, grlog, otr.log, pgp.log, omemo.log, ox.log) continue to be accepted but have no on-disk effect.

What is NOT affected

  • Database-backed history: PREF_DBLOG, PREF_HISTORY, /history, SQLite/flatfile backends.
  • Debug logging: log.c, /log, profanity*.log.
  • xmlconsole, OMEMO/OTR/PGP/OX encryption flows.

Follow-up stages (separate PRs)

  • Stage 2 — remove /logging, /otr log, /pgp log, /omemo log, /ox log commands and decouple PREF_CHLOG from history-replay gating in chatwin.c.
  • Stage 3 — remove the ~20 call sites and the PREF_CHLOG/PREF_GRLOG/PREF_OTR_LOG/PREF_PGP_LOG/PREF_OMEMO_LOG/PREF_OX_LOG preferences.
  • Stage 4 — delete src/chatlog.c, src/chatlog.h, tests/unittests/chatlog/stub_chatlog.c, DIR_CHATLOGS and the _create_chatlogs_dir helper in functional tests.
## Summary Stage 1 of removing the chatlog subsystem that wrote plain-text per-day message logs to `$XDG_DATA_HOME/profanity/chatlogs/<account>/<other>/YYYY_MM_DD.log` (and `chatlogs/<account>/rooms/...` for MUCs). These files were never read back by Profanity — history replay in [src/ui/chatwin.c](src/ui/chatwin.c) reads from the database via `log_database_get_previous_chat`, not from these files — so the feature only ever wrote to disk for users to inspect with external tools. This change reduces [src/chatlog.c](src/chatlog.c) to no-op stubs while preserving all 12 public signatures. The ~20 call sites in `src/event/`, `src/otr/otr.c` and `src/profanity.c` continue to compile and link unchanged. ## What changes for users - `chatlogs/` directory is no longer created or written to. - Existing `chatlogs/` data on disk is left untouched (users may delete it manually). - `/logging`, `/otr log`, `/pgp log`, `/omemo log`, `/ox log` and the related preferences (`chlog`, `grlog`, `otr.log`, `pgp.log`, `omemo.log`, `ox.log`) continue to be accepted but have no on-disk effect. ## What is NOT affected - Database-backed history: `PREF_DBLOG`, `PREF_HISTORY`, `/history`, SQLite/flatfile backends. - Debug logging: `log.c`, `/log`, `profanity*.log`. - `xmlconsole`, OMEMO/OTR/PGP/OX encryption flows. ## Follow-up stages (separate PRs) - **Stage 2** — remove `/logging`, `/otr log`, `/pgp log`, `/omemo log`, `/ox log` commands and decouple `PREF_CHLOG` from history-replay gating in `chatwin.c`. - **Stage 3** — remove the ~20 call sites and the `PREF_CHLOG`/`PREF_GRLOG`/`PREF_OTR_LOG`/`PREF_PGP_LOG`/`PREF_OMEMO_LOG`/`PREF_OX_LOG` preferences. - **Stage 4** — delete `src/chatlog.c`, `src/chatlog.h`, `tests/unittests/chatlog/stub_chatlog.c`, `DIR_CHATLOGS` and the `_create_chatlogs_dir` helper in functional tests.
jabber.developer2 added 1 commit 2026-05-20 10:38:28 +00:00
chore(chatlog): disable background message file logging (stage 1)
All checks were successful
CI Code / Check spelling (pull_request) Successful in 16s
CI Code / Check coding style (pull_request) Successful in 30s
CI Code / Code Coverage (pull_request) Successful in 2m39s
CI Code / Linux (ubuntu) (pull_request) Successful in 4m58s
CI Code / Linux (arch) (pull_request) Successful in 5m56s
CI Code / Linux (debian) (pull_request) Successful in 7m2s
CI Code / Check spelling (push) Successful in 16s
CI Code / Check coding style (push) Successful in 31s
CI Code / Code Coverage (push) Successful in 2m41s
CI Code / Linux (ubuntu) (push) Successful in 5m3s
CI Code / Linux (arch) (push) Successful in 6m2s
CI Code / Linux (debian) (push) Successful in 7m12s
3b673150b4
First stage of removing the chatlog subsystem that writes plain-text
per-day message logs to $XDG_DATA_HOME/profanity/chatlogs/. These files
were never read back by Profanity (history replay reads from the
database via log_database_get_previous_chat), so the feature only ever
wrote to disk for users to inspect with external tools.

This change reduces chatlog.c to no-op stubs, preserving all public
signatures so the ~20 call sites in event/, otr/ and profanity.c
continue to compile and link unchanged. Subsequent stages will remove
the call sites, the related preferences (PREF_CHLOG, PREF_GRLOG and the
per-encryption PREF_*_LOG) and the now-dead commands (/logging,
/otr log, /pgp log, /omemo log, /ox log).

Database-based history (PREF_DBLOG, /history) and the debug log
(log.c, /log) are unaffected.
jabber.developer2 manually merged commit 3b673150b4 into master 2026-05-20 11:41:23 +00:00
Sign in to join this conversation.
No description provided.