feat: add --enable-api-filtering-logging commandline switch (#20335)

This commit is contained in:
Milan Burda 2019-10-04 19:49:09 +02:00 committed by Jeremy Apthorp
parent e1eb9519f5
commit ccff140046
15 changed files with 85 additions and 29 deletions

View file

@ -683,7 +683,7 @@ Overrides the current application's name.
Returns `String` - The current application locale. Possible return values are documented [here](locales.md).
To set the locale, you'll want to use a command line switch at app startup, which may be found [here](https://github.com/electron/electron/blob/master/docs/api/chrome-command-line-switches.md).
To set the locale, you'll want to use a command line switch at app startup, which may be found [here](https://github.com/electron/electron/blob/master/docs/api/command-line-switches.md).
**Note:** When distributing your packaged app, you have to also ship the
`locales` folder.

View file

@ -1,4 +1,4 @@
# Supported Chrome Command Line Switches
# Supported Command Line Switches
> Command line switches supported by Electron.
@ -181,6 +181,17 @@ logging level for all code in the source files under a `foo/bar` directory.
This switch only works when `--enable-logging` is also passed.
## --enable-api-filtering-logging
Enables caller stack logging for the following APIs (filtering events):
- `desktopCapturer.getSources()` / `desktop-capturer-get-sources`
- `remote.require()` / `remote-require`
- `remote.getGlobal()` / `remote-get-builtin`
- `remote.getBuiltin()` / `remote-get-global`
- `remote.getCurrentWindow()` / `remote-get-current-window`
- `remote.getCurrentWebContents()` / `remote-get-current-web-contents`
- `remote.getGuestWebContents()` / `remote-get-guest-web-contents`
## --no-sandbox
Disables Chromium sandbox, which is now enabled by default.

View file

@ -12,7 +12,7 @@ app.commandLine.hasSwitch('disable-gpu')
```
For more information on what kinds of flags and switches you can use, check
out the [Chrome Command Line Switches](./chrome-command-line-switches.md)
out the [Command Line Switches](./command-line-switches.md)
document.
### Instance Methods

View file

@ -15,7 +15,7 @@ app.on('ready', async () => {
})
```
See [`--log-net-log`](chrome-command-line-switches.md#--log-net-logpath) to log network events throughout the app's lifecycle.
See [`--log-net-log`](command-line-switches.md#--log-net-logpath) to log network events throughout the app's lifecycle.
**Note:** All methods unless specified can only be used after the `ready` event
of the `app` module gets emitted.