Skip to content

Log to a file in release builds instead of the system oslog - #3268

Open
trufae wants to merge 2 commits into
deltachat:mainfrom
trufae:nslog2
Open

Log to a file in release builds instead of the system oslog#3268
trufae wants to merge 2 commits into
deltachat:mainfrom
trufae:nslog2

Conversation

@trufae

@trufae trufae commented Aug 18, 2026

Copy link
Copy Markdown

following for #3263

The idea here is that release builds will use a custom logger that just save the logs inside the app home, these files are not accessible from outside the app and are protected by the sandbox.

Also, i have enforced the files to not be backuped or saved in the icloud. i think that we shuold be careful about doing that with other files...because me as a user i wont like to backup/restore anything but the profile credentials.. but that's another topic outside the scope of this pr.

The new code have 2 logger implementations

  • in debug builds it works like before
  • in release builds we save the logs for the last hour (i tried to make this as optimal as possible to reduce syscalls and disk access, because as said, ideally the app shouldnt be logging anything unless the user really wants that, but considering this path is not an option).

im open to discussion about the strategy to rotate logs too,but i hope this appraoch fits better

PD: users must be warned not to share the logs as verbatim without review/redacted because it can include sensitive information. this message must be appearing somewhere around the "View Logs" button.

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.

2 participants