Update docs

This commit is contained in:
Florian Bruhin 2016-08-19 15:27:56 +02:00
parent 5367434a13
commit e074192cc4
4 changed files with 26 additions and 3 deletions

View File

@ -39,6 +39,8 @@ Added
to focus the previous/next category in the completion (bound to `<Ctrl-Tab>`
and `<Ctrl-Shift-Tab>` by default).
- New `:click-element` command to fake a click on a element.
- New `:debug-log-filter` command to change console log filtering on-the-fly.
- New `:debug-log-level` command to change the console loglevel on-the-fly.
Changed
~~~~~~~

View File

@ -199,6 +199,7 @@ Contributors, sorted by the number of commits in descending order:
* Brian Jackson
* sbinix
* neeasade
* knaggita
* jnphilipp
* Tobias Patzl
* Stefan Tatschner
@ -224,7 +225,6 @@ Contributors, sorted by the number of commits in descending order:
* zwarag
* xd1le
* oniondreams
* knaggita
* issue
* haxwithaxe
* evan

View File

@ -1449,6 +1449,8 @@ These commands are mainly intended for debugging. They are hidden if qutebrowser
|<<debug-crash,debug-crash>>|Crash for debugging purposes.
|<<debug-dump-page,debug-dump-page>>|Dump the current page's content to a file.
|<<debug-log-capacity,debug-log-capacity>>|Change the number of log lines to be stored in RAM.
|<<debug-log-filter,debug-log-filter>>|Change the log filter for console logging.
|<<debug-log-level,debug-log-level>>|Change the log level for console logging.
|<<debug-pyeval,debug-pyeval>>|Evaluate a python string and display the results as a web page.
|<<debug-set-fake-clipboard,debug-set-fake-clipboard>>|Put data into the fake clipboard and enable logging, used for tests.
|<<debug-trace,debug-trace>>|Trace executed code via hunter.
@ -1500,6 +1502,24 @@ Change the number of log lines to be stored in RAM.
==== positional arguments
* +'capacity'+: Number of lines for the log.
[[debug-log-filter]]
=== debug-log-filter
Syntax: +:debug-log-filter 'filters'+
Change the log filter for console logging.
==== positional arguments
* +'filters'+: A comma separated list of logger names.
[[debug-log-level]]
=== debug-log-level
Syntax: +:debug-log-level 'level'+
Change the log level for console logging.
==== positional arguments
* +'level'+: The log level to set.
[[debug-pyeval]]
=== debug-pyeval
Syntax: +:debug-pyeval [*--quiet*] 's'+

View File

@ -22,6 +22,7 @@
import functools
import types
import traceback
import logging
try:
import hunter
@ -257,7 +258,7 @@ def debug_log_level(level: str):
"""Change the log level for console logging.
Args:
level: log level for console log.
level: The log level to set.
"""
log.console_handler.setLevel(log.LOG_LEVELS[level.upper()])
@ -267,7 +268,7 @@ def debug_log_filter(filters: str):
"""Change the log filter for console logging.
Args:
filters: log filters for console log.
filters: A comma separated list of logger names.
"""
if set(filters.split(',')).issubset(log.LOGGER_NAMES):
log.console_filter.names = filters.split(',')