Improves #1295
This commit is contained in:
parent
5c8f2d4e69
commit
6eee6c181d
2 changed files with 14 additions and 18 deletions
|
@ -36,17 +36,15 @@ bool AtomMainDelegate::BasicStartupComplete(int* exit_code) {
|
||||||
settings.delete_old = logging::DELETE_OLD_LOG_FILE;
|
settings.delete_old = logging::DELETE_OLD_LOG_FILE;
|
||||||
#else
|
#else
|
||||||
settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
|
settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
|
||||||
#endif
|
#endif // defined(DEBUG)
|
||||||
#endif // defined(OS_WIN)
|
#endif // defined(OS_WIN)
|
||||||
|
|
||||||
// allows setting loglevel --v or --vmodule
|
|
||||||
logging::InitLogging(settings);
|
logging::InitLogging(settings);
|
||||||
|
|
||||||
// Logging with pid and timestamp.
|
// Logging with pid and timestamp.
|
||||||
logging::SetLogItems(true, false, true, false);
|
logging::SetLogItems(true, false, true, false);
|
||||||
|
|
||||||
// Enable convient stack printing.
|
|
||||||
#if defined(DEBUG) && defined(OS_LINUX)
|
#if defined(DEBUG) && defined(OS_LINUX)
|
||||||
|
// Enable convient stack printing.
|
||||||
base::debug::EnableInProcessStackDumping();
|
base::debug::EnableInProcessStackDumping();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -64,27 +64,25 @@ Ignore certificate related errors.
|
||||||
|
|
||||||
## --v=`log_level`
|
## --v=`log_level`
|
||||||
|
|
||||||
Gives the default maximal active V-logging level; 0 is the default.
|
Gives the default maximal active V-logging level; 0 is the default. Normally
|
||||||
Normally positive values are used for V-logging levels.
|
positive values are used for V-logging levels.
|
||||||
|
|
||||||
-1 to disable logs
|
Passing `--v=-1` will disable logging.
|
||||||
|
|
||||||
## --vmodule=`pattern`
|
## --vmodule=`pattern`
|
||||||
|
|
||||||
Gives the per-module maximal V-logging levels to override the value
|
Gives the per-module maximal V-logging levels to override the value given by
|
||||||
given by --v. E.g. "my_module=2,foo*=3" would change the logging
|
`--v`. E.g. `my_module=2,foo*=3` would change the logging level for all code in
|
||||||
level for all code in source files "my_module.*" and "foo*.*"
|
source files `my_module.*` and `foo*.*`.
|
||||||
("-inl" suffixes are also disregarded for this matching).
|
|
||||||
|
|
||||||
Any pattern containing a forward or backward slash will be tested
|
Any pattern containing a forward or backward slash will be tested against the
|
||||||
against the whole pathname and not just the module. E.g.,
|
whole pathname and not just the module. E.g. `*/foo/bar/*=2` would change the
|
||||||
"*/foo/bar/*=2" would change the logging level for all code in
|
logging level for all code in source files under a `foo/bar` directory.
|
||||||
source files under a "foo/bar" directory.
|
|
||||||
|
|
||||||
For example to disable all chromium related logs and only enable
|
To disable all chromium related logs and only enable your application logs you
|
||||||
your application logs
|
can do:
|
||||||
|
|
||||||
```
|
```javascript
|
||||||
app.commandLine.appendSwitch('v', -1);
|
app.commandLine.appendSwitch('v', -1);
|
||||||
app.commandLine.appendSwitch('vmodule', 'console=0');
|
app.commandLine.appendSwitch('vmodule', 'console=0');
|
||||||
```
|
```
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue