Add flog categories for parse-productions

One for usable messages, another for the chatty ones.

Use like `--debug=parse-productions'*'`.
This commit is contained in:
Fabian Homborg 2020-01-19 13:47:37 +01:00
parent 14c2c623b4
commit 6793d35340
2 changed files with 5 additions and 2 deletions

View file

@ -59,6 +59,9 @@ class category_list_t {
category_t exec_fork{L"exec-fork", L"Calls to fork()"};
category_t parse_productions{L"parse-productions", L"Resolving tokens"};
category_t parse_productions_chatty{L"parse-productions-chatty", L"Resolving tokens (chatty messages)"};
category_t proc_job_run{L"proc-job-run", L"Jobs getting started or continued"};
category_t proc_termowner{L"proc-termowner", L"Terminal ownership events"};

View file

@ -414,7 +414,7 @@ const production_element_t *parse_productions::production_for_token(parse_token_
const parse_token_t &input2,
parse_node_tag_t *out_tag) {
// this is **extremely** chatty
debug(6, L"Resolving production for %ls with input token <%ls>",
FLOGF(parse_productions_chatty, L"Resolving production for %ls with input token <%ls>",
token_type_description(node_type), input1.describe().c_str());
// Fetch the function to resolve the list of productions.
@ -462,7 +462,7 @@ const production_element_t *parse_productions::production_for_token(parse_token_
const production_element_t *result = resolver(input1, input2, out_tag);
if (result == nullptr) {
debug(5, L"Node type '%ls' has no production for input '%ls' (in %s)",
FLOGF(parse_productions, L"Node type '%ls' has no production for input '%ls' (in %s)",
token_type_description(node_type), input1.describe().c_str(), __FUNCTION__);
}