Skip to content

feat(logging): add log export shortcut to settings - #18005

Open
xO-ox-ai wants to merge 5 commits into
nextcloud:masterfrom
xO-ox-ai:feat/settings-export-logs
Open

xO-ox-ai wants to merge 5 commits into
nextcloud:masterfrom
xO-ox-ai:feat/settings-export-logs

Conversation

@xO-ox-ai

@xO-ox-ai xO-ox-ai commented Nov 10, 2026 •

Copy link
Copy Markdown

Adds an Export logs shortcut to Settings → More that loads the existing logs and calls LogsEmailSender.

Log exports are saved in Download/Nextcloud/. On completion, a toast and expandable notification show the destination and formatted file size. A failed export shows its error reason instead of a success notification. File copying runs in the existing background task, and write errors propagate to its error callback.

The existing FileExportUtils takes an optional subdirectory; other file exports keep their default Downloads location. The shortcut handles storage permission on Android 9 and earlier. Log levels and logging defaults are unchanged.

Validation

  • 58 logger unit tests passed, including three regression tests for exported bytes and size, a missing source, and a write error reaching the caller with the output closed.
  • App compilation, Android test source compilation, Android lint, detekt and Kotlin formatting checks passed.
  • No device or emulator testing was performed. SpotBugs could not run in the local Windows environment because its Java process failed to start.

🖼️ Screenshots

Not provided; the settings shortcut and result messages have not been tested on a device or emulator.

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed — existing logger tests and export regression tests passed.
  • 🔙 Backport requests are created or not needed — no backport requested.
  • 📅 Milestone is set
  • 🌸 PR title is meaningful

🤖 AI

  • The content of this PR was partly or fully generated using AI.

Implementation and validation were assisted by Codex (GPT-6). The contributor has signed off every commit; AI assistance is recorded in the commit trailers.

Assisted-by: Codex:GPT-6
Signed-off-by: Li Wei <caeser222000@sohu.com>
Connect settings to LogsEmailSender and extend FileExportUtils with an optional Downloads subdirectory and reliable export results. Remove the separate exporter and controller while retaining background work, permission handling and failure feedback.

Assisted-by: Codex:GPT-6
Signed-off-by: Li Wei <caeser222000@sohu.com>
Remove the debug logging switch, preferences, filtering and related tests. Preserve upstream logging behavior and reuse the existing export title.

Assisted-by: Codex:GPT-6
Signed-off-by: Li Wei <caeser222000@sohu.com>
Keep the settings shortcut and legacy storage permission handling. Reuse the original export implementation with an optional Downloads subdirectory, removing the extra export behavior and its tests.

Assisted-by: Codex:GPT-6
Signed-off-by: Li Wei <caeser222000@sohu.com>
@xO-ox-ai
xO-ox-ai force-pushed the feat/settings-export-logs branch from ffc510c to 5787590 Compare November 10, 2026 07:06
Show the export directory and formatted file size in a toast and expandable notification after copying succeeds. Report export errors through the existing background runner instead of announcing success when writing fails.

Assisted-by: Codex:GPT-6
Signed-off-by: Li Wei <caeser222000@sohu.com>
@xO-ox-ai
xO-ox-ai force-pushed the feat/settings-export-logs branch from d73ac15 to 4af81f3 Compare November 12, 2026 03:43
@xO-ox-ai
xO-ox-ai marked this pull request as ready for review November 12, 2026 03:44

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant