2022-07-10 00:01:46 -06:00
|
|
|
debug
|
|
|
|
=====
|
sync tags spreadsheet to git
spreadsheet - https://docs.google.com/spreadsheets/d/1hiDlo8M_bB_1jE-5HRs2RrrA_VZ4cRu9VXaTctX_nwk/edit#gid=170388995
sync command - for fname in *rst; do name=$(echo $fname | sed 's/[.]rst//'); tagline=$(egrep ",$name," ~/Downloads/DFHack\ taxonomy\ -\ Tool\ tags.csv | ~/Downloads/csvtotags.sh); sed -ri "s;[*]*Tags:.*;$tagline;" $fname; done
contents of csvtotags.sh -
fgrep . | sed -r 's/^[^,]+,([^,]+),[^.]+[.]"?,/\1,/' | awk -F, '
function tag(idx, tagname) {
if ($idx == "TRUE") {
if (hastag == 1) {printf(", ")}
printf("`tag/%s`", tagname)
hastag = 1
}
}
{
printf("%s", "**Tags:** ")
hastag = 0
tag(2, "adventure")
tag(3, "fort")
tag(4, "legends")
tag(5, "embark")
tag(6, "system")
tag(7, "dev")
tag(8, "auto")
tag(9, "productivity")
tag(10, "inspection")
tag(11, "design")
tag(12, "quickfort")
tag(13, "interface")
tag(14, "fps")
tag(15, "fix")
tag(16, "mod")
tag(17, "armok")
tag(18, "animals")
tag(19, "buildings")
tag(20, "items")
tag(21, "jobs")
tag(22, "map")
tag(23, "labors")
tag(24, "units")
tag(25, "stockpiles")
tag(26, "trees")
printf("\n")
}
'
2022-08-05 18:55:33 -06:00
|
|
|
**Tags:** `tag/dev`
|
2022-07-22 18:46:11 -06:00
|
|
|
:dfhack-keybind:`debugfilter`
|
|
|
|
|
|
|
|
:index:`Configure verbosity of DFHack debug output.
|
|
|
|
<debugfilter; Configure verbosity of DFHack debug output.>` Debug output is
|
|
|
|
grouped by plugin name, category name, and verbosity level.
|
|
|
|
|
|
|
|
The verbosity levels are:
|
|
|
|
|
|
|
|
- ``Trace``
|
|
|
|
Possibly very noisy messages which can be printed many times per second.
|
|
|
|
- ``Debug``
|
|
|
|
Messages that happen often but they should happen only a couple of times per
|
|
|
|
second.
|
|
|
|
- ``Info``
|
|
|
|
Important state changes that happen rarely during normal execution.
|
|
|
|
- ``Warning``
|
|
|
|
Enabled by default. Shows warnings about unexpected events which code
|
|
|
|
managed to handle correctly.
|
|
|
|
- ``Error``
|
|
|
|
Enabled by default. Shows errors which code can't handle without user
|
|
|
|
intervention.
|
2022-07-10 00:01:46 -06:00
|
|
|
|
|
|
|
The runtime message printing is controlled using filters. Filters set the
|
2022-07-22 18:46:11 -06:00
|
|
|
visible messages of all matching categories. Matching uses regular expression
|
|
|
|
syntax, which allows listing multiple alternative matches or partial name
|
|
|
|
matches. This syntax is a C++ version of the ECMA-262 grammar (Javascript
|
|
|
|
regular expressions). Details of differences can be found at
|
2022-07-10 00:01:46 -06:00
|
|
|
https://en.cppreference.com/w/cpp/regex/ecmascript
|
|
|
|
|
2022-07-22 18:46:11 -06:00
|
|
|
Persistent filters are stored in ``dfhack-config/runtime-debug.json``. Oldest
|
|
|
|
filters are applied first. That means a newer filter can override the older
|
|
|
|
printing level selection.
|
|
|
|
|
|
|
|
Usage:
|
|
|
|
|
2022-07-23 22:55:49 -06:00
|
|
|
``debugfilter category [<plugin regex>] [<category regex>]``
|
2022-07-22 18:46:11 -06:00
|
|
|
List available debug plugin and category names. If filters aren't givenm
|
|
|
|
then all plugins/categories are matched. This command is a good way to test
|
|
|
|
regex parameters before you pass them to ``set``.
|
2022-07-23 22:55:49 -06:00
|
|
|
``debugfilter filter [<id>]``
|
2022-07-22 18:46:11 -06:00
|
|
|
List active and passive debug print level changes. The optional ``id``
|
|
|
|
parameter is the id listed as first column in the filter list. If ``id`` is
|
|
|
|
given, then the command shows extended information for the given filter
|
|
|
|
only.
|
2022-07-23 22:55:49 -06:00
|
|
|
``debugfilter set [<level>] [<plugin regex>] [<category regex>]``
|
2022-07-22 18:46:11 -06:00
|
|
|
Create a new debug filter to set category verbosity levels. This filter
|
|
|
|
will not be saved when the DF process exists or the plugin is unloaded.
|
2022-07-23 22:55:49 -06:00
|
|
|
``debugfilter set persistent [<level>] [<plugin regex>] [<category regex>]``
|
2022-07-22 18:46:11 -06:00
|
|
|
Store the filter in the configuration file to until ``unset`` is used to
|
|
|
|
remove it.
|
2022-07-23 22:55:49 -06:00
|
|
|
``debugfilter unset <id> [<id> ...]``
|
2022-07-22 18:46:11 -06:00
|
|
|
Delete a space separated list of filters.
|
2022-07-23 22:55:49 -06:00
|
|
|
``debugfilter disable <id> [<id> ...]``
|
2022-07-22 18:46:11 -06:00
|
|
|
Disable a space separated list of filters but keep it in the filter list.
|
2022-07-23 22:55:49 -06:00
|
|
|
``debugfilter enable <id> [<id> ...]``
|
2022-07-22 18:46:11 -06:00
|
|
|
Enable a space sperate list of filters.
|
2022-07-23 22:55:49 -06:00
|
|
|
``debugfilter header [enable] | [disable] [<element> ...]``
|
2022-07-22 18:46:11 -06:00
|
|
|
Control which header metadata is shown along with each log message. Run it
|
|
|
|
without parameters to see the list of configurable elements. Include an
|
|
|
|
``enable`` or ``disable`` keyword to change whether specific elements are
|
|
|
|
shown.
|
|
|
|
|
2022-07-23 22:55:49 -06:00
|
|
|
Example
|
|
|
|
-------
|
2022-07-22 18:46:11 -06:00
|
|
|
|
2022-07-23 22:55:49 -06:00
|
|
|
``debugfilter set Warning core script``
|
2022-07-22 18:46:11 -06:00
|
|
|
Hide script execution log messages (e.g. "Loading script:
|
|
|
|
dfhack-config/dfhack.init"), which are normally output at Info verbosity
|
|
|
|
in the "core" plugin with the "script" category.
|