-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
chore: improve renderer crash logging #25592
Conversation
@@ -462,8 +462,7 @@ const addReturnValueToEvent = (event: any) => { | |||
}; | |||
|
|||
const loggingEnabled = () => { | |||
return Object.prototype.hasOwnProperty.call(process.env, 'ELECTRON_ENABLE_LOGGING') || | |||
process.argv.some(arg => arg.toLowerCase().startsWith('--enable-logging')); | |||
return process.env.ELECTRON_ENABLE_LOGGING || app.commandLine.hasSwitch('enable-logging'); |
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.
teeeeechnically the logic for this in base::Environment
is different. Ideally we'd just query this info directly from the C++ which actually controls logging, rather than trying to reimplement this.
Things that enable logging in the C++ without tripping this test, for example:
ELECTRON_ENABLE_LOGGING=0
electron_enable_logging=1
# only on non-Windows platforms:
ELECTRON_ENABLE_LOGGING=
I don't think it's very important to match exactly, but JFYI.
No Release Notes |
I have automatically backported this PR to "11-x-y", please check out #25619 |
I have automatically backported this PR to "9-x-y", please check out #25620 |
I have automatically backported this PR to "10-x-y", please check out #25621 |
Description of Change
Follow up to #25317
Checklist
npm test
passesRelease Notes
Notes: no-notes