status-im / status-mobile

a free (libre) open source, mobile OS for Ethereum
https://status.app
Mozilla Public License 2.0
3.9k stars 988 forks source link

Logging System Enhancement #21501

Open qfrank opened 3 days ago

qfrank commented 3 days ago

Background

Currently, our logging system has two inconsistencies:

  1. Logs are disabled by default in release builds, making it difficult to diagnose user-reported issues
  2. There's a mismatch between log file storage and configuration:
    • Log files: All users share the same log file
    • Log settings: Each user has their own logging configuration in the UI

Problem Statement

These limitations affect our ability to effectively troubleshoot issues:

Proposed Changes

  1. Logging Configuration
    • Change default log level from DISABLED to ERROR in release builds
    • Implement global log level configuration instead of per-user settings to match the shared log file architecture

Acceptance Criteria

  1. Release builds should:
    • Have ERROR as the default log level
  2. Log level settings should:
    • Be applied globally across the application
    • Be consistent with the shared log file approach
    • Remove the per-user log configuration from UI
    • User can set log level before login

cc @ilmotta @churik @Parveshdhull

vkjr commented 3 days ago

@qfrank, I'm totally support this idea. One question regarding logs - wouldn't that be more convenient if we have different log files per user? I think they will be smaller and easier to investigate. I suppose the problem here is that we have some logs that precedes user login.. but maybe this can be a separate log file. Wdyt?

qfrank commented 3 days ago

I suppose the problem here is that we have some logs that precedes user login.. but maybe this can be a separate log file.

I don't have a strong opinion on this. Either solution is okay. Thank you for your input! Let's see what else others think. I'll update the description when we have a conclusion :)

churik commented 11 hours ago

Yes, I'm totally support this idea, besides seems desktop does not have this policy about logs, imo it is important to have the same policy across the app.

Also confirming @vkjr - for me it would make sense for each user to have their own log, but ofc it depends on the cost of the development vs benefite, so I'd strat from simplest solution