Files
frankandSiddarth Kumar 628e5f7938 feat_: allow user to change default app log level during pre-login (#22425)
* feat_: support pre-login log setting(WIP)

* nix: add gradle deps

* chore: update status-go version

https://github.com/status-im/status-go/compare/614000a1...50a1c9ff

* feat: implement MMKV storage functionality for ClojureScript

- Added MMKV instance for persistent storage
- Implemented basic operations: set/get string, boolean, number, and object
- Included methods for key management: contains-key?, delete-key, clear-all, and get-all-keys
- Integrated Transit for serialization/deserialization of ClojureScript data structures

* feat_: enhance logging functionality with pre-login log level settings

- Introduced a new view for managing pre-login log levels.
- Updated logging configuration to utilize MMKV for persistent storage of log levels.
- Refactored existing logging functions to integrate new log level management.
- Improved user experience by allowing log level changes before login.
- Added constants for pre-login log level key and report email.

* chore_: rebase

* ios: pin libwebp at 1.0.0

* chore_: mock mmkv

* chore_: address review feedback from Parvesh

* chore_: update status-go version and commit details

* fix_: remove redundant closing brackets in logging view component

* refactor_: simplify get functions in MMKV by using if-let for value retrieval

- Updated get-string, get-number, and get-object functions to use if-let for cleaner code.
- Removed redundant nil checks, improving readability and maintainability.

* refactor_: replace direct JS calls with oops.core for MMKV operations

- Updated all MMKV operations to use oops.core for method calls, enhancing error handling and improving code consistency.
- Refactored store, get, contains-key?, delete-key, clear-all, and get-all-keys functions to utilize oops/ocall.

* refactor_: rename store function to set-value for clarity

- Updated the MMKV store function to set-value, improving code readability.
- Adjusted the logging core to use the new set-value function for setting pre-login log levels.

* feat_: add getMMKVStoragePath method for native storage path retrieval

- Implemented getMMKVStoragePath in both Android and iOS native modules to provide a consistent path for MMKV storage.
- Updated ClojureScript to utilize the new method for initializing the MMKV instance with the correct storage path.

* chore(mmkv)_: rename set-value to set

* refactor(mmkv): update set function to use local set implementation

- Replaced the oops/ocall for the set function with a direct call to the local set implementation for improved clarity and consistency in the MMKV module.

* feat(test_utils): add getMMKVStoragePath function to test utilities

- Introduced getMMKVStoragePath to return the storage path for MMKV, enhancing test utility functions for better integration with native storage paths.

* refactor(js_dependencies): rename mmkv-storage to react-native-mmkv for clarity

* fix(mmkv): add fallback for MMKV storage path in case of errors

- Implemented a try-catch block to provide a fallback storage path ("/tmp/test-mmkv") for the MMKV instance, ensuring stability during tests when the native storage path retrieval fails.

* refactor(logging): update send-logs function to include hide-bottom-sheet parameter

* fix_: bottom sheet not hidden after sharing logs

* chore_: solve circular dependency

* fix_: android logs drawer constantly opens

* fix_: pre-login log level init with incorrect value after logout

* chore_: update status-go-version to v10.22.0

---------

Co-authored-by: Siddarth Kumar <siddarthkay@gmail.com>
2025-04-10 19:39:36 +08:00
..