-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NO QA] fix: collecting logs on dev #36659
[NO QA] fix: collecting logs on dev #36659
Conversation
cc @techievivek |
* @param args arguments passed to the console.log function | ||
*/ | ||
// eslint-disable-next-line no-console | ||
console.log = (...args) => { | ||
logMessage(args); | ||
if (shouldStoreLogs && CONFIG.ENVIRONMENT !== CONST.ENVIRONMENT.DEV) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coming from the slack thread https://expensify.slack.com/archives/C01GTK53T8Q/p1708081810577189?thread_ts=1703982689.203629&cid=C01GTK53T8Q
ah, we can’t entirely skip adding a log to onyx here, because this override is needed when e.g. console.log is used in the callback function of the executed arbitrary code. I opened this PR and added an environment check, tested it and works fine.
That means this piece of code won't work?
console.log = (...args) => {
originalConsoleLog.apply(console, args);
};
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/techievivek in version: 1.4.43-0 🚀
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.43-20 🚀
|
Details
This is the follow up PR to #36337
When working on the app locally and using
console.log
in the app, logs are stored in Onyx no matter if Client side logging is on or off. This might cause problems for developers, like crashing the app, when they log a large output.Fixed Issues
$ #34082
PROPOSAL:
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
n/aAndroid: mWeb Chrome
n/a
iOS: Native
n/a
iOS: mWeb Safari
n/a
MacOS: Chrome / Safari
n/a
MacOS: Desktop
n/a