Skip to content

feat(Android): configure RNSLog utility#3718

Merged
sgaczol merged 4 commits intomainfrom
@sgaczol/rnslog-android
Mar 5, 2026
Merged

feat(Android): configure RNSLog utility#3718
sgaczol merged 4 commits intomainfrom
@sgaczol/rnslog-android

Conversation

@sgaczol
Copy link
Copy Markdown
Collaborator

@sgaczol sgaczol commented Mar 3, 2026

Description

Introduce automatic RNSLog activation in debug mode and deactivation in release mode. This behavior can be manually overridden using the rnsDebugLogsEnabled flag.

Example usage:
yarn run android --mode release --extra-params "-PrnsDebugLogsEnabled=true" activates RNSLog in release mode.
yarn run android --mode debug --extra-params "-PrnsDebugLogsEnabled=false" deactivates RNSLog in debug mode.

Extend RNSLog functionality.

Changes

  • update gradle.properties and build.gradle
  • add more functionality to RNSLog analogous to native Android Log

Before & after - visual documentation

Not applicable.

Test plan

Run app in both modes and check if it works properly.

Checklist

  • Included code example that can be used to test this change.
  • Updated / created local changelog entries in relevant test files.
  • For visual changes, included screenshots / GIFs / recordings documenting the change.
  • For API changes, updated relevant public types.
  • Ensured that CI passes

Copy link
Copy Markdown
Member

@kkafar kkafar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you!

I've left a single remark

Comment on lines -46 to -48
# Use this property to enable or disable debug logging
rnsDebugLogsEnabled=true

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd leave this in place, just because it'll be easier to find & modify.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can I leave it commented out though so setting it to true/false would be optional then? Leaving it uncommented permanently will disturb default release mode state.

Copy link
Copy Markdown
Collaborator Author

@sgaczol sgaczol Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind, you're right, it won't interfere there: 1e28b55

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@sgaczol sgaczol requested review from kkafar and t0maboro March 4, 2026 11:08
Copy link
Copy Markdown
Contributor

@kligarski kligarski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sensible.

@sgaczol sgaczol merged commit 1506219 into main Mar 5, 2026
5 checks passed
@sgaczol sgaczol deleted the @sgaczol/rnslog-android branch March 5, 2026 09:45
sgaczol added a commit that referenced this pull request Mar 5, 2026
## Description

This PR changes `RNSLog` activating/deactivating depending on
debug/release mode mechanism introduced in
#3718

To activate `RNSLog`, set flag `rnsDebugLogsEnabled` to true.

## Changes

- update `gradle.properties` in `TVOSExample`
- update `build.gradle`

## Before & after - visual documentation

N/A

## Test plan

Run app with set flag and check if logs work properly.

## Checklist

- [ ] Included code example that can be used to test this change.
- [ ] Updated / created local changelog entries in relevant test files.
- [ ] For visual changes, included screenshots / GIFs / recordings
documenting the change.
- [ ] For API changes, updated relevant public types.
- [ ] Ensured that CI passes
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.

5 participants