complete command line switch && add enviroment variables
This commit is contained in:
parent
d35996b4a0
commit
c8a2246952
2 changed files with 57 additions and 8 deletions
|
@ -124,19 +124,15 @@ app.commandLine.appendSwitch('proxy-bypass-list', '<local>;*.google.com;*foo.com
|
|||
|
||||
设置默认最大活跃 V-logging 标准; 默认为 0.通常 V-logging 标准值为肯定值.
|
||||
|
||||
This switch only works when `--enable-logging` is also passed.
|
||||
这个开关只有在 `--enable-logging` 开启时有效.
|
||||
|
||||
## --vmodule=`pattern`
|
||||
|
||||
Gives the per-module maximal V-logging levels to override the value given by
|
||||
`--v`. E.g. `my_module=2,foo*=3` would change the logging level for all code in
|
||||
source files `my_module.*` and `foo*.*`.
|
||||
赋予每个模块最大的 V-logging levels 来覆盖 `--v` 给的值.E.g. `my_module=2,foo*=3` 会改变所有源文件 `my_module.*` and `foo*.*` 的代码中的 logging level .
|
||||
|
||||
Any pattern containing a forward or backward slash will be tested against the
|
||||
whole pathname and not just the module. E.g. `*/foo/bar/*=2` would change the
|
||||
logging level for all code in the source files under a `foo/bar` directory.
|
||||
任何包含向前的(forward slash)或者向后的(backward slash)模式将被测试用于阻止整个路径名,并且不仅是E.g模块.`*/foo/bar/*=2` 将会改变所有在 `foo/bar` 下的源文件代码中的 logging level .
|
||||
|
||||
This switch only works when `--enable-logging` is also passed.
|
||||
这个开关只有在 `--enable-logging` 开启时有效.
|
||||
|
||||
[app]: app.md
|
||||
[append-switch]: app.md#appcommandlineappendswitchswitch-value
|
||||
|
|
53
docs-translations/zh-CN/api/environment-variables.md
Normal file
53
docs-translations/zh-CN/api/environment-variables.md
Normal file
|
@ -0,0 +1,53 @@
|
|||
# 环境变量
|
||||
|
||||
一些 Electron 的行为受到环境变量的控制,因为他们的初始化比命令行和应用代码更早.
|
||||
|
||||
POSIX shells 的例子:
|
||||
|
||||
```bash
|
||||
$ export ELECTRON_ENABLE_LOGGING=true
|
||||
$ electron
|
||||
```
|
||||
|
||||
Windows 控制台:
|
||||
|
||||
```powershell
|
||||
> set ELECTRON_ENABLE_LOGGING=true
|
||||
> electron
|
||||
```
|
||||
|
||||
## `ELECTRON_RUN_AS_NODE`
|
||||
|
||||
类似node.js普通进程启动方式.
|
||||
|
||||
## `ELECTRON_ENABLE_LOGGING`
|
||||
|
||||
打印 Chrome 的内部日志到控制台.
|
||||
|
||||
## `ELECTRON_LOG_ASAR_READS`
|
||||
|
||||
当 Electron 读取 ASA 文档,把 read offset 和文档路径做日志记录到系统 `tmpdir`.结果文件将提供给 ASAR 模块来优化文档组织.
|
||||
|
||||
## `ELECTRON_ENABLE_STACK_DUMPING`
|
||||
|
||||
当 Electron 崩溃的时候,打印堆栈记录到控制台.
|
||||
|
||||
如果 `crashReporter` 已经启动那么这个环境变量实效.
|
||||
|
||||
## `ELECTRON_DEFAULT_ERROR_MODE` _Windows_
|
||||
|
||||
当 Electron 崩溃的时候,显示windows的崩溃对话框.
|
||||
|
||||
如果 `crashReporter` 已经启动那么这个环境变量实效.
|
||||
|
||||
## `ELECTRON_NO_ATTACH_CONSOLE` _Windows_
|
||||
|
||||
不可使用当前控制台.
|
||||
|
||||
## `ELECTRON_FORCE_WINDOW_MENU_BAR` _Linux_
|
||||
|
||||
不可再 Linux 上使用全局菜单栏.
|
||||
|
||||
## `ELECTRON_HIDE_INTERNAL_MODULES`
|
||||
|
||||
关闭旧的内置模块如 `require('ipc')` 的通用模块.
|
Loading…
Reference in a new issue