feat: Make default MMKV log level configurable at build time#995
feat: Make default MMKV log level configurable at build time#995mrousavy merged 4 commits intomrousavy:mainfrom
Conversation
mrousavy
left a comment
There was a problem hiding this comment.
Thank you for this PR - this is great stuff!
I just have one change - can we not make the MMKV_LOG_LEVEL definition optional and instead always define it, but if it's not defined we use a default value (0 in debug, 3 in release)?
That way we can eliminate some of the conditionals here - always good to remove conditionals for predictability.
Allow library consumers to override the default MMKV core log level via Gradle properties (Android) or Podfile variables (iOS).
Co-authored-by: Marc Rousavy <me@mrousavy.com>
Simplify the log level logic by always defining MMKV_LOG_LEVEL with a default (0/Debug in debug builds, 3/Error in release) in the shared types header, removing the conditional branches from HybridMMKVFactory.cpp.
0c391be to
72fd97e
Compare
Good idea - I've moved this to |
|
@mrousavy could you re-trigger the Build iOS job? It looks like it failed for an unrelated reason: https://github.com/mrousavy/react-native-mmkv/actions/runs/21909536593/job/63378522905?pr=995 |
|
Awesome, thanks! LGTM |

Allow library consumers to override the default MMKV core log level via Gradle properties (Android) or Podfile variables (iOS).