Update querytrace to become toggle-able on/off while named is running
Querytrace logging is currently only useful when we have a readily reproducible problem that it would help to debug.
Nobody is going to run it just in case of an intermittent problem because the CPU overhead is far too high.
But we do encounter intermittent problems where we need to enable querytrace while named is running, once the problem has occurred, and without restarting named first. Once such example is #11195/#44676 (Nominet 9.11.0-P2 crashes, memory consumption, odd errors with RPZ).
Would it be possible to frame the querytrace code in such away that it is completely inactive (although compiled in), thus not incurring the CPU overhead, until it is toggled 'active' via RNDC?
As above. (With some appreciation that this is not trivial to implement effectively, as it will need to wrap the code that does the logging inside logic that determines whether or not the output is wanted, so that the work to prepare the output is squelched, as well as the emitted log messages).